diff --git a/deployments/avalanche/GenericRebalancer_USDp.json b/deployments/avalanche/GenericRebalancer_USDp.json new file mode 100644 index 0000000..af5764a --- /dev/null +++ b/deployments/avalanche/GenericRebalancer_USDp.json @@ -0,0 +1,1228 @@ +{ + "address": "0xb5a980349434a46687f425075f5558cd185ab9fa", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialTokenTransferAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "initialSwapRouter", + "type": "address" + }, + { + "internalType": "contract ITokenP", + "name": "definitivetokenP", + "type": "address" + }, + { + "internalType": "contract IParallelizer", + "name": "definitiveParallelizer", + "type": "address" + }, + { + "internalType": "address", + "name": "initialAuthority", + "type": "address" + }, + { + "internalType": "contract IERC3156FlashLender", + "name": "definitiveFlashloan", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AccessManagedInvalidAuthority", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "name": "AccessManagedRequiredDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessManagedUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParam", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrusted", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrustedOrGuardian", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SwapError", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "AllowanceReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "TokenTransferAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "trusted", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "TrustedToggled", + "type": "event" + }, + { + "inputs": [], + "name": "CALLBACK_SUCCESS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "addBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "budget", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "computeRebalanceAmount", + "outputs": [ + { + "internalType": "uint8", + "name": "increase", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "flashloan", + "outputs": [ + { + "internalType": "contract IERC3156FlashLender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "scale", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "harvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isTrusted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onFlashLoan", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "parallelizer", + "outputs": [ + { + "internalType": "contract IParallelizer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToRecover", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "removeBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "resetAllowance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "newMaxSlippage", + "type": "uint64" + } + ], + "name": "setMaxSlippage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + } + ], + "name": "setTargetExposure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "setTokenTransferAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "name": "setYieldBearingAssetData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "swapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trusted", + "type": "address" + } + ], + "name": "toggleTrusted", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokenP", + "outputs": [ + { + "internalType": "contract ITokenP", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenTransferAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "updateLimitExposuresYieldAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "yieldBearingData", + "outputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contractName": "GenericRebalancer", + "sourceName": "contracts/helpers/GenericRebalancer.sol", + "bytecode": "0x60e060405234801561000f575f5ffd5b5060405161327238038061327283398101604081905261002e9161018c565b84868386868261003d81610122565b506001600160a01b0391821660a0528116608052600380549482166001600160a01b03199586161790556004805493821693909416929092179092558216905061009a5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0381811660c081905260a05160405163095ea7b360e01b815260048101929092525f1960248301529091169063095ea7b3906044016020604051808303815f875af11580156100f2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610116919061020f565b50505050505050610235565b5f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6001600160a01b0381168114610189575f5ffd5b50565b5f5f5f5f5f5f60c087890312156101a1575f5ffd5b86516101ac81610175565b60208801519096506101bd81610175565b60408801519095506101ce81610175565b60608801519094506101df81610175565b60808801519093506101f081610175565b60a088015190925061020181610175565b809150509295509295509295565b5f6020828403121561021f575f5ffd5b8151801515811461022e575f5ffd5b9392505050565b60805160a05160c051612f956102dd5f395f818161021a015281816106110152611f5a01525f81816101d6015281816105d9015281816107390152818161085901528181610e83015281816117710152611f8a01525f818161027501528181610779015281816108070152818161088f0152818161107901528181611720015281816117a5015281816118cc0152818161195d01528181611bd90152611cfb0152612f955ff3fe608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": { + "10252": [ + { + "length": 32, + "start": 629 + }, + { + "length": 32, + "start": 1913 + }, + { + "length": 32, + "start": 2055 + }, + { + "length": 32, + "start": 2191 + }, + { + "length": 32, + "start": 4217 + }, + { + "length": 32, + "start": 5920 + }, + { + "length": 32, + "start": 6053 + }, + { + "length": 32, + "start": 6348 + }, + { + "length": 32, + "start": 6493 + }, + { + "length": 32, + "start": 7129 + }, + { + "length": 32, + "start": 7419 + } + ], + "10256": [ + { + "length": 32, + "start": 470 + }, + { + "length": 32, + "start": 1497 + }, + { + "length": 32, + "start": 1849 + }, + { + "length": 32, + "start": 2137 + }, + { + "length": 32, + "start": 3715 + }, + { + "length": 32, + "start": 6001 + }, + { + "length": 32, + "start": 8074 + } + ], + "11053": [ + { + "length": 32, + "start": 538 + }, + { + "length": 32, + "start": 1553 + }, + { + "length": 32, + "start": 8026 + } + ] + }, + "inputSourceName": "project/contracts/helpers/GenericRebalancer.sol", + "devdoc": { + "author": "Cooper Labs", + "custom:contact": "security@cooperlabs.xyz", + "details": "Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol", + "errors": { + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC-20 token failed." + } + ] + }, + "events": { + "AuthorityUpdated(address)": { + "details": "Authority that manages this contract was updated." + } + }, + "kind": "dev", + "methods": { + "addBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to add to the budget", + "receiver": "address of the receiver" + } + }, + "authority()": { + "details": "Returns the current authority." + }, + "computeRebalanceAmount(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + }, + "returns": { + "amount": "amount to be rebalanced", + "increase": "whether the exposure should be increased" + } + }, + "harvest(address,uint256,bytes)": { + "details": "This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers" + }, + "isConsumingScheduledOp()": { + "details": "Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls." + }, + "onFlashLoan(address,address,uint256,uint256,bytes)": { + "details": "A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back", + "params": { + "amount": "The amount of tokens lent.", + "data": "Arbitrary data structure, intended to contain user-defined parameters.", + "fee": "The additional amount of tokens to repay.", + "initiator": "The initiator of the loan.", + "token": "The loan currency." + }, + "returns": { + "_0": "The keccak256 hash of \"ERC3156FlashBorrower.onFlashLoan\"" + } + }, + "recoverERC20(address,uint256,address)": { + "params": { + "amountToRecover": "amount to recover", + "to": "address to send the recovered tokens", + "tokenAddress": "address of the token to recover" + } + }, + "removeBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to remove from the budget", + "receiver": "address of the receiver" + } + }, + "resetAllowance(address,address)": { + "details": "Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.", + "params": { + "spender": "address losing the allowance", + "token": "address of the token" + } + }, + "setAuthority(address)": { + "details": "Transfers control to a new authority. The caller must be the current authority." + }, + "setMaxSlippage(address,uint64)": { + "params": { + "newMaxSlippage": "new max allowed slippage" + } + }, + "setSwapRouter(address)": { + "params": { + "newSwapRouter": "address of the swap router" + } + }, + "setTargetExposure(address,uint64)": { + "params": { + "targetExposure": "target exposure to the yield bearing asset used", + "yieldBearingAsset": "address of the yield bearing asset" + } + }, + "setTokenTransferAddress(address)": { + "params": { + "newTokenTransferAddress": "address of the token transfer contract" + } + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "params": { + "asset": "address of the asset", + "maxExposure": "maximum exposure within the Parallelizer to the asset", + "minExposure": "minimum exposure within the Parallelizer to the asset", + "overrideExposures": "whether limit exposures should be overriden or read onchain through the Parallelizer", + "targetExposure": "target exposure to the yieldBearingAsset asset used", + "yieldBearingAsset": "address of the yieldBearingAsset" + } + }, + "toggleTrusted(address)": { + "params": { + "trusted": "address to toggle the trusted status" + } + }, + "updateLimitExposuresYieldAsset(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + } + } + }, + "title": "GenericRebalancer", + "version": 1 + }, + "evm": { + "gasEstimates": { + "creation": { + "codeDepositCost": "2436200", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "CALLBACK_SUCCESS()": "240", + "addBudget(uint256,address)": "infinite", + "authority()": "2407", + "budget(address)": "2554", + "computeRebalanceAmount(address)": "infinite", + "flashloan()": "infinite", + "harvest(address,uint256,bytes)": "infinite", + "isConsumingScheduledOp()": "2442", + "isTrusted(address)": "2612", + "onFlashLoan(address,address,uint256,uint256,bytes)": "infinite", + "parallelizer()": "infinite", + "recoverERC20(address,uint256,address)": "infinite", + "removeBudget(uint256,address)": "infinite", + "resetAllowance(address,address)": "infinite", + "setAuthority(address)": "30486", + "setMaxSlippage(address,uint64)": "infinite", + "setSwapRouter(address)": "infinite", + "setTargetExposure(address,uint64)": "infinite", + "setTokenTransferAddress(address)": "infinite", + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": "infinite", + "swapRouter()": "2392", + "toggleTrusted(address)": "infinite", + "tokenP()": "infinite", + "tokenTransferAddress()": "2415", + "updateLimitExposuresYieldAsset(address)": "infinite", + "yieldBearingData(address)": "5001" + }, + "internal": { + "_adjustYieldExposure(uint256,uint8,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_recoverResidualInput(address,uint256)": "infinite", + "_swapToTokenOut(uint256,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_swapToTokenOutSwap(address,address,uint256,bytes memory)": "infinite", + "_swapToTokenOutVault(uint256,address,address,uint256)": "infinite" + } + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialTokenTransferAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialSwapRouter\",\"type\":\"address\"},{\"internalType\":\"contract ITokenP\",\"name\":\"definitivetokenP\",\"type\":\"address\"},{\"internalType\":\"contract IParallelizer\",\"name\":\"definitiveParallelizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialAuthority\",\"type\":\"address\"},{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"definitiveFlashloan\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AccessManagedInvalidAuthority\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"delay\",\"type\":\"uint32\"}],\"name\":\"AccessManagedRequiredDelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrustedOrGuardian\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SwapError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"AllowanceReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"TokenTransferAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CALLBACK_SUCCESS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"addBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"budget\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"computeRebalanceAmount\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"increase\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flashloan\",\"outputs\":[{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"harvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onFlashLoan\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parallelizer\",\"outputs\":[{\"internalType\":\"contract IParallelizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountToRecover\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"removeBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"resetAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"newMaxSlippage\",\"type\":\"uint64\"}],\"name\":\"setMaxSlippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"}],\"name\":\"setTargetExposure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"setTokenTransferAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"name\":\"setYieldBearingAssetData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenTransferAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"updateLimitExposuresYieldAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"yieldBearingData\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"AuthorityUpdated(address)\":{\"details\":\"Authority that manages this contract was updated.\"}},\"kind\":\"dev\",\"methods\":{\"addBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to add to the budget\",\"receiver\":\"address of the receiver\"}},\"authority()\":{\"details\":\"Returns the current authority.\"},\"computeRebalanceAmount(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"},\"returns\":{\"amount\":\"amount to be rebalanced\",\"increase\":\"whether the exposure should be increased\"}},\"harvest(address,uint256,bytes)\":{\"details\":\"This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"onFlashLoan(address,address,uint256,uint256,bytes)\":{\"details\":\"A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back\",\"params\":{\"amount\":\"The amount of tokens lent.\",\"data\":\"Arbitrary data structure, intended to contain user-defined parameters.\",\"fee\":\"The additional amount of tokens to repay.\",\"initiator\":\"The initiator of the loan.\",\"token\":\"The loan currency.\"},\"returns\":{\"_0\":\"The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\"}},\"recoverERC20(address,uint256,address)\":{\"params\":{\"amountToRecover\":\"amount to recover\",\"to\":\"address to send the recovered tokens\",\"tokenAddress\":\"address of the token to recover\"}},\"removeBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to remove from the budget\",\"receiver\":\"address of the receiver\"}},\"resetAllowance(address,address)\":{\"details\":\"Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.\",\"params\":{\"spender\":\"address losing the allowance\",\"token\":\"address of the token\"}},\"setAuthority(address)\":{\"details\":\"Transfers control to a new authority. The caller must be the current authority.\"},\"setMaxSlippage(address,uint64)\":{\"params\":{\"newMaxSlippage\":\"new max allowed slippage\"}},\"setSwapRouter(address)\":{\"params\":{\"newSwapRouter\":\"address of the swap router\"}},\"setTargetExposure(address,uint64)\":{\"params\":{\"targetExposure\":\"target exposure to the yield bearing asset used\",\"yieldBearingAsset\":\"address of the yield bearing asset\"}},\"setTokenTransferAddress(address)\":{\"params\":{\"newTokenTransferAddress\":\"address of the token transfer contract\"}},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"params\":{\"asset\":\"address of the asset\",\"maxExposure\":\"maximum exposure within the Parallelizer to the asset\",\"minExposure\":\"minimum exposure within the Parallelizer to the asset\",\"overrideExposures\":\"whether limit exposures should be overriden or read onchain through the Parallelizer\",\"targetExposure\":\"target exposure to the yieldBearingAsset asset used\",\"yieldBearingAsset\":\"address of the yieldBearingAsset\"}},\"toggleTrusted(address)\":{\"params\":{\"trusted\":\"address to toggle the trusted status\"}},\"updateLimitExposuresYieldAsset(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"}}},\"title\":\"GenericRebalancer\",\"version\":1},\"userdoc\":{\"events\":{\"SwapRouterUpdated(address)\":{\"notice\":\"Event emitted when the swap router is updated\"},\"TokenTransferAddressUpdated(address)\":{\"notice\":\"Event emitted when the token proxy is updated\"}},\"kind\":\"user\",\"methods\":{\"addBudget(uint256,address)\":{\"notice\":\"Add budget to be spent by the receiver during the flashloan\"},\"budget(address)\":{\"notice\":\"Budget of tokenP available for each users\"},\"computeRebalanceAmount(address)\":{\"notice\":\"Compute the amount needed to rebalance the Parallelizer\"},\"flashloan()\":{\"notice\":\"Parallel stablecoin flashloan contract\"},\"harvest(address,uint256,bytes)\":{\"notice\":\"Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset\"},\"isTrusted(address)\":{\"notice\":\"trusted addresses that can update target exposure and do others non critical operations\"},\"parallelizer()\":{\"notice\":\"Reference to the `parallelizer` implementation this contract aims at rebalancing\"},\"recoverERC20(address,uint256,address)\":{\"notice\":\"Recover ERC20 tokens\"},\"removeBudget(uint256,address)\":{\"notice\":\"Remove budget from the owner and send it to the receiver\"},\"resetAllowance(address,address)\":{\"notice\":\"Set an allowance this contract granted back to zero\"},\"setMaxSlippage(address,uint64)\":{\"notice\":\"Set the max allowed slippage\"},\"setSwapRouter(address)\":{\"notice\":\"Set the swap router\"},\"setTargetExposure(address,uint64)\":{\"notice\":\"Set the target exposure of a yield bearing asset\"},\"setTokenTransferAddress(address)\":{\"notice\":\"Set the token transfer address\"},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"notice\":\"Set the yieldBearingAsset data\"},\"swapRouter()\":{\"notice\":\"address of the router/aggregator\"},\"toggleTrusted(address)\":{\"notice\":\"Toggle the trusted status of an address\"},\"tokenP()\":{\"notice\":\"TokenP handled by the `parallelizer` of interest\"},\"tokenTransferAddress()\":{\"notice\":\"address to approve to transfer tokens to\"},\"updateLimitExposuresYieldAsset(address)\":{\"notice\":\"Set the limit exposures to the asset linked to the yield bearing asset\"},\"yieldBearingData(address)\":{\"notice\":\"Data associated to a yield bearing asset\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/helpers/GenericRebalancer.sol\":\"GenericRebalancer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManaged.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManaged {\\n /**\\n * @dev Authority that manages this contract was updated.\\n */\\n event AuthorityUpdated(address authority);\\n\\n error AccessManagedUnauthorized(address caller);\\n error AccessManagedRequiredDelay(address caller, uint32 delay);\\n error AccessManagedInvalidAuthority(address authority);\\n\\n /**\\n * @dev Returns the current authority.\\n */\\n function authority() external view returns (address);\\n\\n /**\\n * @dev Transfers control to a new authority. The caller must be the current authority.\\n */\\n function setAuthority(address) external;\\n\\n /**\\n * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n * attacker controlled calls.\\n */\\n function isConsumingScheduledOp() external view returns (bytes4);\\n}\\n\",\"keccak256\":\"0x1121e070554cffc6d536f658332a1a3d65fb2ea5573cd774f4ecbd02a2fcf4b7\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashBorrower.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashBorrower.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashBorrower, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashBorrower {\\n /**\\n * @dev Receive a flash loan.\\n * @param initiator The initiator of the loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param fee The additional amount of tokens to repay.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n * @return The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\\n */\\n function onFlashLoan(\\n address initiator,\\n address token,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n ) external returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e4b982b56b50290dd1dcaa2fef1178b1574dfc7c0f0a8ef9cb68a207d72582e\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashLender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashLender.sol)\\n\\npragma solidity >=0.5.0;\\n\\nimport {IERC3156FlashBorrower} from \\\"./IERC3156FlashBorrower.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashLender, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashLender {\\n /**\\n * @dev The amount of currency available to be lended.\\n * @param token The loan currency.\\n * @return The amount of `token` that can be borrowed.\\n */\\n function maxFlashLoan(address token) external view returns (uint256);\\n\\n /**\\n * @dev The fee to be charged for a given loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @return The amount of `token` to be charged for the loan, on top of the returned principal.\\n */\\n function flashFee(address token, uint256 amount) external view returns (uint256);\\n\\n /**\\n * @dev Initiate a flash loan.\\n * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n */\\n function flashLoan(\\n IERC3156FlashBorrower receiver,\\n address token,\\n uint256 amount,\\n bytes calldata data\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x218d708e7d8df417db24a497727eefb7772e61c7cde3886fc42bbcb6aafa6947\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/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\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/helpers/BaseRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { AccessManaged } from \\\"../utils/AccessManaged.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport \\\"contracts/interfaces/IRebalancer.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nstruct YieldBearingParams {\\n // Address of the asset used to mint the yield bearing asset\\n address asset;\\n // Target exposure to the collateral yield bearing asset used\\n uint64 targetExposure;\\n // Maximum exposure within the Parallelizer to the deposit asset\\n uint64 maxExposure;\\n // Minimum exposure within the Parallelizer to the deposit asset\\n uint64 minExposure;\\n // Whether limit exposures should be overriden or read onchain through the Parallelizer\\n // This value should be 1 to override exposures or 2 if these shouldn't be overriden\\n uint64 overrideExposures;\\n // Maximum slippage when dealing with the Parallelizer, bounded below 1e9 so uint64 leaves the\\n // struct packed in two slots\\n uint64 maxSlippage;\\n}\\n\\n/// @title BaseRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Abstract contract for a rebalancer that aims at rebalancing a Parallelizer\\n/// @dev This contract is an authorized fork of Angle's BaseHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/BaseHarvester.sol\\nabstract contract BaseRebalancer is IRebalancer, AccessManaged {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrusted() {\\n if (!isTrusted[msg.sender]) revert NotTrusted();\\n _;\\n }\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted or guardian to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrustedOrRestricted() {\\n if (!isTrusted[msg.sender] && !_checkCanCall(_msgSender(), _msgData())) {\\n revert NotTrustedOrGuardian();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VARIABLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reference to the `parallelizer` implementation this contract aims at rebalancing\\n IParallelizer public immutable parallelizer;\\n /// @notice TokenP handled by the `parallelizer` of interest\\n ITokenP public immutable tokenP;\\n /// @notice Data associated to a yield bearing asset\\n mapping(address => YieldBearingParams) public yieldBearingData;\\n /// @notice trusted addresses that can update target exposure and do others non critical operations\\n mapping(address => bool) public isTrusted;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EVENTS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n event Recovered(address token, uint256 amount, address to);\\n event TrustedToggled(address trusted, bool status);\\n event AllowanceReset(address indexed token, address indexed spender);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialAuthority,\\n ITokenP definitiveTokenP,\\n IParallelizer definitiveParallelizer\\n )\\n AccessManaged(initialAuthority)\\n {\\n tokenP = definitiveTokenP;\\n parallelizer = definitiveParallelizer;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n GUARDIAN FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the yieldBearingAsset data\\n * @param yieldBearingAsset address of the yieldBearingAsset\\n * @param asset address of the asset\\n * @param targetExposure target exposure to the yieldBearingAsset asset used\\n * @param minExposure minimum exposure within the Parallelizer to the asset\\n * @param maxExposure maximum exposure within the Parallelizer to the asset\\n * @param overrideExposures whether limit exposures should be overriden or read onchain through the Parallelizer\\n */\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external\\n restricted\\n {\\n _setYieldBearingAssetData(\\n yieldBearingAsset, asset, targetExposure, minExposure, maxExposure, overrideExposures, maxSlippage\\n );\\n }\\n\\n /**\\n * @notice Set the limit exposures to the asset linked to the yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n */\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) public virtual {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n if (yieldBearingInfo.overrideExposures == 2) {\\n _updateLimitExposuresYieldAsset(yieldBearingInfo.asset, yieldBearingInfo);\\n }\\n }\\n\\n /**\\n * @notice Set the max allowed slippage\\n * @param newMaxSlippage new max allowed slippage\\n */\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external restricted {\\n _setMaxSlippage(yieldBearingAsset, newMaxSlippage);\\n }\\n\\n /**\\n * @notice Toggle the trusted status of an address\\n * @param trusted address to toggle the trusted status\\n */\\n function toggleTrusted(address trusted) external restricted {\\n emit TrustedToggled(trusted, isTrusted[trusted]);\\n isTrusted[trusted] = !isTrusted[trusted];\\n }\\n\\n /**\\n * @notice Recover ERC20 tokens\\n * @param tokenAddress address of the token to recover\\n * @param amountToRecover amount to recover\\n * @param to address to send the recovered tokens\\n */\\n function recoverERC20(address tokenAddress, uint256 amountToRecover, address to) external restricted {\\n emit Recovered(tokenAddress, amountToRecover, to);\\n IERC20(tokenAddress).safeTransfer(to, amountToRecover);\\n }\\n\\n /**\\n * @notice Set an allowance this contract granted back to zero\\n * @param token address of the token\\n * @param spender address losing the allowance\\n * @dev Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing\\n * asset's configuration revokes the approvals it created, but this covers a spender that became\\n * untrusted for any other reason.\\n */\\n function resetAllowance(address token, address spender) external restricted {\\n IERC20(token).forceApprove(spender, 0);\\n emit AllowanceReset(token, spender);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n TRUSTED FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the target exposure of a yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @param targetExposure target exposure to the yield bearing asset used\\n */\\n function setTargetExposure(address yieldBearingAsset, uint64 targetExposure) external onlyTrustedOrRestricted {\\n yieldBearingData[yieldBearingAsset].targetExposure = targetExposure;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Compute the amount needed to rebalance the Parallelizer\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @return increase whether the exposure should be increased\\n * @return amount amount to be rebalanced\\n */\\n function computeRebalanceAmount(address yieldBearingAsset) external view returns (uint8 increase, uint256 amount) {\\n return _computeRebalanceAmount(yieldBearingAsset, yieldBearingData[yieldBearingAsset]);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _computeRebalanceAmount(\\n address yieldBearingAsset,\\n YieldBearingParams memory yieldBearingInfo\\n )\\n internal\\n view\\n returns (uint8 increase, uint256 amount)\\n {\\n (uint256 stablecoinsFromYieldBearingAsset, uint256 stablecoinsIssued) =\\n parallelizer.getIssuedByCollateral(yieldBearingAsset);\\n (uint256 stablecoinsFromAsset,) = parallelizer.getIssuedByCollateral(yieldBearingInfo.asset);\\n uint256 targetExposureScaled = yieldBearingInfo.targetExposure * stablecoinsIssued;\\n if (stablecoinsFromYieldBearingAsset * 1e9 > targetExposureScaled) {\\n // Need to decrease exposure to yield bearing asset\\n amount = stablecoinsFromYieldBearingAsset - targetExposureScaled / 1e9;\\n uint256 maxValueScaled = yieldBearingInfo.maxExposure * stablecoinsIssued;\\n // These checks assume that there are no transaction fees on the stablecoin->collateral conversion and so\\n // it's still possible that exposure goes above the max exposure in some rare cases\\n if (stablecoinsFromAsset * 1e9 > maxValueScaled) {\\n amount = 0;\\n } else if ((stablecoinsFromAsset + amount) * 1e9 > maxValueScaled) {\\n amount = maxValueScaled / 1e9 - stablecoinsFromAsset;\\n }\\n } else {\\n // In this case, exposure after the operation might remain slightly below the targetExposure as less\\n // collateral may be obtained by burning stablecoins for the yield asset and unwrapping it\\n increase = 1;\\n amount = targetExposureScaled / 1e9 - stablecoinsFromYieldBearingAsset;\\n uint256 minValueScaled = yieldBearingInfo.minExposure * stablecoinsIssued;\\n if (stablecoinsFromAsset * 1e9 < minValueScaled) {\\n amount = 0;\\n } else if (stablecoinsFromAsset * 1e9 < minValueScaled + amount * 1e9) {\\n amount = stablecoinsFromAsset - minValueScaled / 1e9;\\n }\\n }\\n }\\n\\n function _setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n internal\\n virtual\\n {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n address previousAsset = yieldBearingInfo.asset;\\n // Allowances are granted without expiry, so the outgoing asset would keep the yield bearing\\n // vault authorised over any of it later held here\\n if (previousAsset != address(0) && previousAsset != asset) {\\n IERC20(previousAsset).forceApprove(yieldBearingAsset, 0);\\n emit AllowanceReset(previousAsset, yieldBearingAsset);\\n _revokeAssetAllowances(yieldBearingAsset, previousAsset);\\n }\\n yieldBearingInfo.asset = asset;\\n if (targetExposure >= 1e9) revert InvalidParam();\\n if (maxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingInfo.targetExposure = targetExposure;\\n yieldBearingInfo.overrideExposures = overrideExposures;\\n yieldBearingInfo.maxSlippage = maxSlippage;\\n if (overrideExposures == 1) {\\n if (maxExposure >= 1e9 || minExposure >= maxExposure) revert InvalidParam();\\n yieldBearingInfo.maxExposure = maxExposure;\\n yieldBearingInfo.minExposure = minExposure;\\n } else {\\n yieldBearingInfo.overrideExposures = 2;\\n _updateLimitExposuresYieldAsset(asset, yieldBearingInfo);\\n }\\n }\\n\\n /// @notice Lets a rebalancer revoke the allowances it granted over an asset being rotated out\\n function _revokeAssetAllowances(address yieldBearingAsset, address previousAsset) internal virtual { }\\n\\n function _updateLimitExposuresYieldAsset(\\n address asset,\\n YieldBearingParams storage yieldBearingInfo\\n )\\n internal\\n virtual\\n {\\n uint64[] memory xFeeMint;\\n (xFeeMint,) = parallelizer.getCollateralMintFees(asset);\\n uint256 length = xFeeMint.length;\\n if (length <= 1) yieldBearingInfo.maxExposure = 1e9;\\n else yieldBearingInfo.maxExposure = xFeeMint[length - 2];\\n\\n uint64[] memory xFeeBurn;\\n (xFeeBurn,) = parallelizer.getCollateralBurnFees(asset);\\n length = xFeeBurn.length;\\n if (length <= 1) yieldBearingInfo.minExposure = 0;\\n else yieldBearingInfo.minExposure = xFeeBurn[length - 2];\\n }\\n\\n function _setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) internal virtual {\\n if (newMaxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingData[yieldBearingAsset].maxSlippage = newMaxSlippage;\\n }\\n\\n function _scaleAmountBasedOnDecimals(\\n uint256 decimalsTokenIn,\\n uint256 decimalsTokenOut,\\n uint256 amountIn,\\n bool assetIn\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (decimalsTokenIn > decimalsTokenOut) {\\n if (assetIn) {\\n amountIn /= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n } else {\\n amountIn *= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n }\\n } else if (decimalsTokenIn < decimalsTokenOut) {\\n if (assetIn) {\\n amountIn *= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n } else {\\n amountIn /= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n }\\n }\\n return amountIn;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPER \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _adjustAllowance(address token, address sender, uint256 amountIn) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), sender);\\n if (allowance < amountIn) IERC20(token).safeIncreaseAllowance(sender, type(uint256).max - allowance);\\n }\\n}\\n\",\"keccak256\":\"0x5d05479be1ac7d1dc738cb8fc2e539c82e88a2191dee278cc74fd647eed17ebc\",\"license\":\"GPL-3.0\"},\"project/contracts/helpers/GenericRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC3156FlashBorrower } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol\\\";\\nimport { IERC3156FlashLender } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol\\\";\\nimport { RouterSwapper } from \\\"@helpers/RouterSwapper.sol\\\";\\n\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IERC4626 } from \\\"contracts/interfaces/external/IERC4626.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nimport { BaseRebalancer, YieldBearingParams } from \\\"./BaseRebalancer.sol\\\";\\n\\nenum SwapType {\\n VAULT,\\n SWAP\\n}\\n\\n/// @title GenericRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Generic contract for trusted callers to adjust the reserves of Angle Parallelizer\\n/// @dev This contract is an authorized fork of Angle's GenericHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\\ncontract GenericRebalancer is BaseRebalancer, IERC3156FlashBorrower, RouterSwapper {\\n using SafeCast for uint256;\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant CALLBACK_SUCCESS = keccak256(\\\"ERC3156FlashBorrower.onFlashLoan\\\");\\n\\n /// @notice Parallel stablecoin flashloan contract\\n IERC3156FlashLender public immutable flashloan;\\n /// @notice Budget of tokenP available for each users\\n mapping(address => uint256) public budget;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INITIALIZATION \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialTokenTransferAddress,\\n address initialSwapRouter,\\n ITokenP definitivetokenP,\\n IParallelizer definitiveParallelizer,\\n address initialAuthority,\\n IERC3156FlashLender definitiveFlashloan\\n )\\n RouterSwapper(initialSwapRouter, initialTokenTransferAddress)\\n BaseRebalancer(initialAuthority, definitivetokenP, definitiveParallelizer)\\n {\\n if (address(definitiveFlashloan) == address(0)) revert ZeroAddress();\\n flashloan = definitiveFlashloan;\\n\\n IERC20(tokenP).approve(address(definitiveFlashloan), type(uint256).max);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n BUDGET HANDLING\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Add budget to be spent by the receiver during the flashloan\\n * @param amount amount of tokenP to add to the budget\\n * @param receiver address of the receiver\\n */\\n function addBudget(uint256 amount, address receiver) public virtual {\\n budget[receiver] += amount;\\n\\n IERC20(tokenP).safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Remove budget from the owner and send it to the receiver\\n * @param amount amount of tokenP to remove from the budget\\n * @param receiver address of the receiver\\n */\\n function removeBudget(uint256 amount, address receiver) public virtual {\\n budget[msg.sender] -= amount; // Will revert if not enough funds\\n\\n IERC20(tokenP).safeTransfer(receiver, amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HARVEST\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure\\n /// to this yieldBearingAsset\\n /// @dev This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up\\n /// some yieldBearingAsset that can then be used for people looking to burn deposit tokens\\n /// @dev Due to potential transaction fees within the Parallelizer, this function doesn't exactly bring\\n /// `yieldBearingAsset` to the target exposure\\n /// @dev scale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest,\\n /// it is used to lower the amount of the asset to harvest for example to have a lower slippage\\n /// @dev Restricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the\\n /// collateral oracle, neither of which can be safely exposed to arbitrary callers\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) public virtual onlyTrusted {\\n if (scale > 1e9) revert InvalidParam();\\n updateLimitExposuresYieldAsset(yieldBearingAsset);\\n YieldBearingParams memory yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n (uint8 increase, uint256 amount) = _computeRebalanceAmount(yieldBearingAsset, yieldBearingInfo);\\n amount = (amount * scale) / 1e9;\\n if (amount == 0) revert ZeroAmount();\\n (SwapType swapType, bytes memory data) = abi.decode(extraData, (SwapType, bytes));\\n try parallelizer.updateOracle(yieldBearingAsset) { } catch { }\\n _adjustYieldExposure(\\n amount,\\n increase,\\n yieldBearingAsset,\\n yieldBearingInfo.asset,\\n (amount * (1e9 - yieldBearingInfo.maxSlippage)) / 1e9,\\n swapType,\\n data\\n );\\n }\\n\\n /// @inheritdoc IERC3156FlashBorrower\\n /// @dev A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any\\n /// shortfall between the principal and the tokenP the rebalance minted back\\n function onFlashLoan(\\n address initiator,\\n address,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n )\\n public\\n virtual\\n returns (bytes32)\\n {\\n if (msg.sender != address(flashloan) || initiator != address(this)) revert NotTrusted();\\n address sender;\\n uint256 typeAction;\\n uint256 minAmountOut;\\n SwapType swapType;\\n bytes memory callData;\\n address tokenOut;\\n address tokenIn;\\n {\\n address yieldBearingAsset;\\n address asset;\\n (sender, typeAction, yieldBearingAsset, asset, minAmountOut, swapType, callData) =\\n abi.decode(data, (address, uint256, address, address, uint256, SwapType, bytes));\\n if (typeAction == 1) {\\n // Increase yield exposure action: we bring in the yield bearing asset\\n tokenOut = yieldBearingAsset;\\n tokenIn = asset;\\n } else {\\n // Decrease yield exposure action: we bring in the deposit asset\\n tokenIn = yieldBearingAsset;\\n tokenOut = asset;\\n }\\n }\\n uint256 tokenInBalanceBefore = IERC20(tokenIn).balanceOf(address(this));\\n\\n uint256 amountOut =\\n parallelizer.swapExactInput(amount, 0, address(tokenP), tokenIn, address(this), block.timestamp);\\n // The principal is spent, what the lender will pull back is the principal plus its fee\\n amount += fee;\\n\\n // Swap to tokenOut\\n amountOut = _swapToTokenOut(typeAction, tokenIn, tokenOut, amountOut, swapType, callData);\\n\\n _adjustAllowance(tokenOut, address(parallelizer), amountOut);\\n uint256 amountStableOut =\\n parallelizer.swapExactInput(amountOut, minAmountOut, tokenOut, address(tokenP), address(this), block.timestamp);\\n\\n amountStableOut += _recoverResidualInput(tokenIn, tokenInBalanceBefore);\\n\\n if (amount > amountStableOut) {\\n budget[sender] -= amount - amountStableOut; // Will revert if not enough funds\\n } else if (amountStableOut > amount) {\\n budget[sender] += amountStableOut - amount;\\n }\\n return CALLBACK_SUCCESS;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SETTERS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the token transfer contract\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress) public override restricted {\\n super.setTokenTransferAddress(newTokenTransferAddress);\\n }\\n\\n /**\\n * @notice Set the swap router\\n * @param newSwapRouter address of the swap router\\n */\\n function setSwapRouter(address newSwapRouter) public override restricted {\\n super.setSwapRouter(newSwapRouter);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNALS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Burns `amountStablecoins` for one yieldBearing asset, swap for asset then mints deposit tokens\\n /// from the proceeds of the swap.\\n /// @dev If `increase` is 1, then the system tries to increase its exposure to the yield bearing asset which means\\n /// burning tokenP for the deposit asset, swapping for the yield bearing asset, then minting the tokenP\\n /// @dev This function reverts if the second tokenP mint gives less than `minAmountOut` of ag tokens\\n /// @dev This function reverts if the swap slippage is higher than `maxSlippage`\\n function _adjustYieldExposure(\\n uint256 amountStablecoins,\\n uint8 increase,\\n address yieldBearingAsset,\\n address asset,\\n uint256 minAmountOut,\\n SwapType swapType,\\n bytes memory extraData\\n )\\n internal\\n {\\n flashloan.flashLoan(\\n IERC3156FlashBorrower(address(this)),\\n address(tokenP),\\n amountStablecoins,\\n abi.encode(msg.sender, increase, yieldBearingAsset, asset, minAmountOut, swapType, extraData)\\n );\\n }\\n\\n /**\\n * @dev Returns any input the route did not consume to the Parallelizer\\n * @param tokenIn address of the token offered to the route\\n * @param balanceBefore balance of `tokenIn` held before the operation\\n * @return the tokenP obtained from the remainder, zero when the route consumed everything\\n *\\n * Router calldata is built off chain while the input is sized on chain, so a route can consume\\n * less than was offered. Returning the remainder keeps it inside the Parallelizer's accounting\\n * instead of stranding it here, and it settles with the rest of the operation.\\n */\\n function _recoverResidualInput(address tokenIn, uint256 balanceBefore) internal returns (uint256) {\\n uint256 balanceAfter = IERC20(tokenIn).balanceOf(address(this));\\n if (balanceAfter <= balanceBefore) return 0;\\n uint256 residual = balanceAfter - balanceBefore;\\n _adjustAllowance(tokenIn, address(parallelizer), residual);\\n return parallelizer.swapExactInput(residual, 0, tokenIn, address(tokenP), address(this), block.timestamp);\\n }\\n\\n function _swapToTokenOut(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n SwapType swapType,\\n bytes memory callData\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (swapType == SwapType.SWAP) {\\n amountOut = _swapToTokenOutSwap(tokenIn, tokenOut, amount, callData);\\n } else if (swapType == SwapType.VAULT) {\\n amountOut = _swapToTokenOutVault(typeAction, tokenIn, tokenOut, amount);\\n }\\n }\\n\\n /**\\n * @notice Swap token using the router/aggregator\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n * @param callData bytes to call the router/aggregator\\n */\\n function _swapToTokenOutSwap(\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n bytes memory callData\\n )\\n internal\\n returns (uint256)\\n {\\n uint256 balance = IERC20(tokenOut).balanceOf(address(this));\\n\\n address[] memory tokens = new address[](1);\\n tokens[0] = tokenIn;\\n bytes[] memory callDatas = new bytes[](1);\\n callDatas[0] = callData;\\n uint256[] memory amounts = new uint256[](1);\\n amounts[0] = amount;\\n _swap(tokens, callDatas, amounts);\\n // A route that consumed less than offered would otherwise leave the difference approved\\n IERC20(tokenIn).forceApprove(tokenTransferAddress, 0);\\n\\n return IERC20(tokenOut).balanceOf(address(this)) - balance;\\n }\\n\\n /**\\n * @dev Deposit or redeem the vault asset\\n * @param typeAction 1 for deposit, 2 for redeem\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n */\\n function _swapToTokenOutVault(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (typeAction == 1) {\\n // Granting allowance with the yieldBearingAsset for the vault asset\\n _adjustAllowance(tokenIn, tokenOut, amount);\\n amountOut = IERC4626(tokenOut).deposit(amount, address(this));\\n } else {\\n amountOut = IERC4626(tokenIn).redeem(amount, address(this), address(this));\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe10b65b2a75ead0d938a2282cf478e94ea425adb38a03ca077fa0422ec2d322c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IDiamondCut\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondCut.sol by mudgen\\n/// @dev This interface is an authorized fork of Angle's `IDiamondCut` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IDiamondCut.sol\\ninterface IDiamondCut {\\n /// @notice Add/replace/remove any number of functions and optionally execute a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments, executed with delegatecall on\\n /// _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x08a01f77b740f7da424f0ea27a6a292f9e292058e23d1fe960d2d19a44496c7b\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondEtherscan.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IDiamondEtherscan\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface IDiamondEtherscan {\\n /// @notice Sets a dummy implementation with the same layout at the diamond proxy contract with all its facets\\n function setDummyImplementation(address _implementation) external;\\n\\n /// @notice Address of the dummy implementation used to make the DiamondProxy contract interpretable by Etherscan\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xf742b55592d129e02fb755d25f7a97ed976a14c4c744d6ac46726809e8f1e037\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @notice IDiamondLoupe\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondLoupe.sol by mudgen\\ninterface IDiamondLoupe {\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xa5580958acabe2c44967e835e77a748eb0b8812f70cd071191201508c9388ca8\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IDiamondCut } from \\\"./IDiamondCut.sol\\\";\\nimport { IDiamondEtherscan } from \\\"./IDiamondEtherscan.sol\\\";\\nimport { IDiamondLoupe } from \\\"./IDiamondLoupe.sol\\\";\\nimport { IGetters } from \\\"./IGetters.sol\\\";\\nimport { IRedeemer } from \\\"./IRedeemer.sol\\\";\\nimport { IRewardHandler } from \\\"./IRewardHandler.sol\\\";\\nimport { ISettersGovernor, ISettersGuardian } from \\\"./ISetters.sol\\\";\\nimport { ISwapper } from \\\"./ISwapper.sol\\\";\\nimport { ISurplus } from \\\"./ISurplus.sol\\\";\\n\\n/// @title IParallelizer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuter` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuter.sol\\ninterface IParallelizer is\\n IDiamondCut,\\n IDiamondEtherscan,\\n IDiamondLoupe,\\n IGetters,\\n IRedeemer,\\n IRewardHandler,\\n ISettersGovernor,\\n ISettersGuardian,\\n ISwapper,\\n ISurplus\\n{ }\\n\",\"keccak256\":\"0x3d43efebf663185429a411300477c3a62bf5e025fb286cf812cd0b589fb8bd5a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IHarvester` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IHarvester.sol\\ninterface IRebalancer {\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address stablecoin,\\n uint64 targetExposure,\\n uint64 minExposureYieldAsset,\\n uint64 maxExposureYieldAsset,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external;\\n\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) external;\\n\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external;\\n\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) external;\\n}\\n\",\"keccak256\":\"0x0a30a492e29ebe67db0f4cac7bfb142d04556a61282e71733d13c11daeba08b1\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISurplus.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISurplus {\\n /// @dev This function will swap the surplus of a collateral for the stable asset link to the protocol.\\n /// @param collateral The collateral address to process the surplus of.\\n /// @param maxCollateralAmount The maximum amount of collateral to process. If 0, processes the full surplus.\\n /// @return collateralSurplus The surplus of the collateral actually processed.\\n /// @return stableSurplus The surplus amount in stable calculated from the collateral surplus.\\n /// @return issuedAmount The amount of newly issued stablecoins from the collateral swapped\\n function processSurplus(\\n address collateral,\\n uint256 maxCollateralAmount\\n )\\n external\\n returns (uint256 collateralSurplus, uint256 stableSurplus, uint256 issuedAmount);\\n\\n /// @notice Releases the income to the payees\\n /// @return payees The addresses of the payees\\n /// @return amounts The amounts released to the payees\\n function release() external returns (address[] memory payees, uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x0129ea80a666d553ddd13c02f56a72cc96a6ac4e45578f0f523def2732ce450f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISwapper\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISwapper` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISwapper.sol\\ninterface ISwapper {\\n /// @notice Swaps (that is to say mints or burns) an exact amount of `tokenIn` for an amount of `tokenOut`\\n /// @param amountIn Amount of `tokenIn` to bring\\n /// @param amountOutMin Minimum amount of `tokenOut` to get: if `amountOut` is inferior to this amount, the\\n /// function will revert\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountOut Amount of `tokenOut` obtained through the swap\\n function swapExactInput(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactInput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactInputWithPermit(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Swaps (that is to say mints or burns) an amount of `tokenIn` for an exact amount of `tokenOut`\\n /// @param amountOut Amount of `tokenOut` to obtain from the swap\\n /// @param amountInMax Maximum amount of `tokenIn` to bring in order to get `amountOut` of `tokenOut`\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountIn Amount of `tokenIn` used to perform the swap\\n function swapExactOutput(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactOutput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactOutputWithPermit(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactInput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeSwapExactInputNonce(...)`,\\n /// which binds the full swap intent. `authData.nonce` carries the caller-chosen `userSalt`; the\\n /// facet recomputes the derived nonce from the call arguments before forwarding it to the\\n /// token, so any tampering with `to`/slippage/deadline invalidates the signature.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactInputWithAuthorization(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactOutput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The authorization must be signed for `amountInMax`; the excess is refunded to the\\n /// authorizer. Derived-nonce scheme as in `swapExactInputWithAuthorization`, using\\n /// `LibAuthorization.computeSwapExactOutputNonce(...)`.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactOutputWithAuthorization(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Simulates what a call to `swapExactInput` with `amountIn` of `tokenIn` for `tokenOut` would give.\\n /// If called right before and at the same block, the `amountOut` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactInput`\\n function quoteIn(uint256 amountIn, address tokenIn, address tokenOut) external view returns (uint256 amountOut);\\n\\n /// @notice Simulates what a call to `swapExactOutput` for `amountOut` of `tokenOut` with `tokenIn` would give.\\n /// If called right before and at the same block, the `amountIn` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactOutput`\\n function quoteOut(uint256 amountOut, address tokenIn, address tokenOut) external view returns (uint256 amountIn);\\n}\\n\",\"keccak256\":\"0xbf7e08cff6dd51c222f86976d3526307098b80100c81978a55566043924cfc06\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/// @notice ERC4626 interface\\n/// @author OpenZeppelin\\n/// @dev In this implementation, the interface only contains the functions that the IERC4626 interface adds on top of\\n/// the IERC20 interface\\ninterface IERC4626 {\\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\":\"0xd730d6a6b679201eec89dff3133de651da20b3e72e74f01b734078bfacf952ad\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/AccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { IAccessManaged } from \\\"@openzeppelin/contracts/access/manager/IAccessManaged.sol\\\";\\nimport { Context } from \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\n/// @title AccessControl\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Fork of OpenZeppelin's `AccessManaged` contract\\n/// updated to make _checkCanCall to return bool\\n/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/manager/AccessManaged.sol\\ncontract AccessManaged is Context, IAccessManaged {\\n address private _authority;\\n\\n bool private _consumingSchedule;\\n\\n /**\\n * @dev Initializes the contract connected to an initial authority.\\n */\\n constructor(address initialAuthority) {\\n _setAuthority(initialAuthority);\\n }\\n\\n /**\\n * @dev Restricts access to a function as defined by the connected Authority for this contract and the\\n * caller and selector of the function that entered the contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * In general, this modifier should only be used on `external` functions. It is okay to use it on `public`\\n * functions that are used as external entry points and are not called internally. Unless you know what you're\\n * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security\\n * implications! This is because the permissions are determined by the function that entered the contract, i.e. the\\n * function at the bottom of the call stack, and not the function where the modifier is visible in the source code.\\n * ====\\n *\\n * [WARNING]\\n * ====\\n * Avoid adding this modifier to the\\n * https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]\\n * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These\\n * functions are the only execution paths where a function selector cannot be unambiguously determined from the\\n * calldata\\n * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()`\\n * function\\n * if no calldata is provided. (See {_checkCanCall}).\\n *\\n * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.\\n * ====\\n */\\n modifier restricted() {\\n address caller = _msgSender();\\n require(_checkCanCall(caller, _msgData()), AccessManagedUnauthorized(caller));\\n _;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function authority() public view virtual returns (address) {\\n return _authority;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function setAuthority(address newAuthority) public virtual {\\n address caller = _msgSender();\\n if (caller != authority()) {\\n revert AccessManagedUnauthorized(caller);\\n }\\n if (newAuthority.code.length == 0) {\\n revert AccessManagedInvalidAuthority(newAuthority);\\n }\\n _setAuthority(newAuthority);\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function isConsumingScheduledOp() public view returns (bytes4) {\\n return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /**\\n * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the\\n * permissions set by the current authority.\\n */\\n function _setAuthority(address newAuthority) internal virtual {\\n _authority = newAuthority;\\n emit AuthorityUpdated(newAuthority);\\n }\\n\\n function _checkCanCall(address caller, bytes calldata data) internal virtual returns (bool) {\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(authority(), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n _consumingSchedule = true;\\n IAccessManager(authority()).consumeScheduledOp(caller, data);\\n _consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x40dfee0e736695b3005df6c150a2d794ac06f3f4b91745e2959623e770044798\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"},\"project/libs/helpers/RouterSwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/// @title Swapper\\n/// @author Angle Labs, Inc.\\n/// @dev Abstract contract for swapping tokens using a router/aggregator\\n/// @dev This contract is an authorized fork of Angle's `RouterSwapper` contract\\n/// https://github.com/AngleProtocol/utils/blob/main/src/RouterSwapper.sol\\nabstract contract RouterSwapper {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERRORS\\n //////////////////////////////////////////////////////////////*/\\n\\n error SwapError();\\n error ZeroAddress();\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Event emitted when the swap router is updated\\n */\\n event SwapRouterUpdated(address newSwapRouter);\\n /**\\n * @notice Event emitted when the token proxy is updated\\n */\\n event TokenTransferAddressUpdated(address newTokenTransferAddress);\\n\\n /*//////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////*/\\n\\n modifier noZeroAddress(address targetAddress) {\\n if (targetAddress == address(0)) {\\n revert ZeroAddress();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n MUTABLE VARIABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice address of the router/aggregator\\n */\\n address public swapRouter;\\n /**\\n * @notice address to approve to transfer tokens to\\n */\\n address public tokenTransferAddress;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(address initialSwapRouter, address initialTokenTransferAddress) {\\n swapRouter = initialSwapRouter;\\n tokenTransferAddress = initialTokenTransferAddress;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the router/aggregator address\\n * @param newSwapRouter address of the new router/aggregator\\n */\\n function setSwapRouter(address newSwapRouter) public virtual noZeroAddress(newSwapRouter) {\\n swapRouter = newSwapRouter;\\n\\n emit SwapRouterUpdated(newSwapRouter);\\n }\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the new token transfer address\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress)\\n public\\n virtual\\n noZeroAddress(newTokenTransferAddress)\\n {\\n tokenTransferAddress = newTokenTransferAddress;\\n\\n emit TokenTransferAddressUpdated(newTokenTransferAddress);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n SWAP FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Approve the router/aggregator to spend the token if needed\\n * @param token address of the token to approve\\n * @param spender address of the router/aggregator\\n * @param amount amount to approve\\n */\\n function _approveTokenIfNeeded(address token, address spender, uint256 amount) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), spender);\\n if (allowance < amount) {\\n IERC20(token).safeIncreaseAllowance(spender, amount - allowance);\\n }\\n }\\n\\n /**\\n * @notice Perform the swap using the router/aggregator\\n * @param callData bytes to call the router/aggregator\\n */\\n function _performRouterSwap(bytes memory callData) internal {\\n (bool success, bytes memory retData) = swapRouter.call(callData);\\n\\n if (!success) {\\n if (retData.length != 0) {\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, retData), mload(retData))\\n }\\n }\\n revert SwapError();\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swapCalldata(address[] calldata tokens, bytes[] calldata callDatas, uint256[] calldata amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swap(address[] memory tokens, bytes[] memory callDatas, uint256[] memory amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8c5a6b026a95816806814ef681b6b225ea4c405a39a4eab0111921853202829c\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "storageLayout": { + "storage": [ + { + "astId": 29857, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_authority", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 29859, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_consumingSchedule", + "offset": 20, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 10262, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "yieldBearingData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)" + }, + { + "astId": 10267, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "isTrusted", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 30616, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "swapRouter", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 30619, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "tokenTransferAddress", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 11058, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "budget", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct YieldBearingParams)", + "numberOfBytes": "32", + "value": "t_struct(YieldBearingParams)10202_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(YieldBearingParams)10202_storage": { + "encoding": "inplace", + "label": "struct YieldBearingParams", + "members": [ + { + "astId": 10191, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "asset", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 10193, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "targetExposure", + "offset": 20, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 10195, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxExposure", + "offset": 0, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10197, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "minExposure", + "offset": 8, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10199, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "overrideExposures", + "offset": 16, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10201, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxSlippage", + "offset": 24, + "slot": "1", + "type": "t_uint64" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + }, + "userdoc": { + "events": { + "SwapRouterUpdated(address)": { + "notice": "Event emitted when the swap router is updated" + }, + "TokenTransferAddressUpdated(address)": { + "notice": "Event emitted when the token proxy is updated" + } + }, + "kind": "user", + "methods": { + "addBudget(uint256,address)": { + "notice": "Add budget to be spent by the receiver during the flashloan" + }, + "budget(address)": { + "notice": "Budget of tokenP available for each users" + }, + "computeRebalanceAmount(address)": { + "notice": "Compute the amount needed to rebalance the Parallelizer" + }, + "flashloan()": { + "notice": "Parallel stablecoin flashloan contract" + }, + "harvest(address,uint256,bytes)": { + "notice": "Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset" + }, + "isTrusted(address)": { + "notice": "trusted addresses that can update target exposure and do others non critical operations" + }, + "parallelizer()": { + "notice": "Reference to the `parallelizer` implementation this contract aims at rebalancing" + }, + "recoverERC20(address,uint256,address)": { + "notice": "Recover ERC20 tokens" + }, + "removeBudget(uint256,address)": { + "notice": "Remove budget from the owner and send it to the receiver" + }, + "resetAllowance(address,address)": { + "notice": "Set an allowance this contract granted back to zero" + }, + "setMaxSlippage(address,uint64)": { + "notice": "Set the max allowed slippage" + }, + "setSwapRouter(address)": { + "notice": "Set the swap router" + }, + "setTargetExposure(address,uint64)": { + "notice": "Set the target exposure of a yield bearing asset" + }, + "setTokenTransferAddress(address)": { + "notice": "Set the token transfer address" + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "notice": "Set the yieldBearingAsset data" + }, + "swapRouter()": { + "notice": "address of the router/aggregator" + }, + "toggleTrusted(address)": { + "notice": "Toggle the trusted status of an address" + }, + "tokenP()": { + "notice": "TokenP handled by the `parallelizer` of interest" + }, + "tokenTransferAddress()": { + "notice": "address to approve to transfer tokens to" + }, + "updateLimitExposuresYieldAsset(address)": { + "notice": "Set the limit exposures to the asset linked to the yield bearing asset" + }, + "yieldBearingData(address)": { + "notice": "Data associated to a yield bearing asset" + } + }, + "version": 1 + }, + "argsData": "0x00000000000000000000000088de50b233052e4fb783d4f6db78cc34fea3e9fc00000000000000000000000088de50b233052e4fb783d4f6db78cc34fea3e9fc0000000000000000000000009ee1963f05553ef838604dd39403be21cef26aa400000000000000000000000041d58951cbd12d4ef49b0437897677bbf5547c800000000000000000000000001cbed02a8ac954390cba057290760f6d12489fa30000000000000000000000009e0dcf7a33bbde6689560c5c807dd2a3df991277", + "transaction": { + "hash": "0xba8f93f4a7dd2f776c410acd955dd0bf0b431dc3a0c7341a8dd67d025f4632d6", + "nonce": "0xe3", + "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" + }, + "receipt": { + "blockHash": "0xf1f1b2d5bfa2abd8afe2a6f07f89c3f33c0b5f953c5c3dddf5465c9db00d895e", + "blockNumber": "0x5c87339", + "transactionIndex": "0x7" + } +} \ No newline at end of file diff --git a/deployments/avalanche/Getters.json b/deployments/avalanche/Getters.json index 034a93b..e6a174a 100644 --- a/deployments/avalanche/Getters.json +++ b/deployments/avalanche/Getters.json @@ -1,5 +1,5 @@ { - "address": "0x457ee3ab077bd58d32e651d07bc3c4383039af55", + "address": "0x2fe66473d35a98131e1d08ff519378ad62dbbbef", "abi": [ { "inputs": [], @@ -549,6 +549,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getSwapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getTotalIssued", @@ -752,8 +765,8 @@ ], "contractName": "Getters", "sourceName": "contracts/parallelizer/facets/Getters.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061415b8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506141968061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -804,7 +817,7 @@ "getSlippageTolerance(address)": { "details": "Maximum slippage tolerance is 1e9 (100%)" }, - "getSurplusBufferRatio()": { + "getSwapRouter()": { "details": "Expressed in base 1e9, and always >= 1e9" }, "isConsumingScheduledOp()": { @@ -823,9 +836,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3346200", - "executionCost": "3721", - "totalCost": "3349921" + "codeDepositCost": "3358000", + "executionCost": "3737", + "totalCost": "3361737" }, "external": { "accessManager()": "2418", @@ -847,7 +860,8 @@ "getShares(address)": "2561", "getSlippageTolerance(address)": "2564", "getStablecoinCap(address)": "infinite", - "getSurplusBufferRatio()": "2356", + "getSurplusBufferRatio()": "2334", + "getSwapRouter()": "2420", "getTotalIssued()": "infinite", "getTotalShares()": "2369", "isConsumingScheduledOp()": "infinite", @@ -862,7 +876,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSurplusBufferRatio()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSurplusBufferRatio()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processing\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x04f12ddeb53bb3bba9aaf9a93c62a84076cca496642d4d87556b15120b60e07b\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0xd53f1dc85e3e3b30205017bf00b54c9b511963034d382ecc647e65ad854b314e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSwapRouter()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSwapRouter()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSwapRouter() external view returns (address) {\\n return s.transmuterStorage().swapRouter;\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0x7698420203383c245b91740b40652708e240877ec9d006d211556c7ffe0406e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -927,8 +941,8 @@ "getStablecoinCap(address)": { "notice": "Returns the stablecoin cap for `collateral`" }, - "getSurplusBufferRatio()": { - "notice": "Returns the minimum collateral ratio that must hold after surplus processing" + "getSwapRouter()": { + "notice": "Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to" }, "getTotalIssued()": { "notice": "Returns the total amount of stablecoins issued through Parallelizer" @@ -965,13 +979,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0x4fffa60ff29527a9237985a702100f6ba2fb121dcce486746fe2495ef0a4814f", - "nonce": "0xc5", + "hash": "0x2c0b33ca04de8cf311e3fb4dca8a58f72158cfd15f216436745da82969972716", + "nonce": "0xe0", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0xafe3d156c3be43422eb652c0e21119a16c42a6da4eb24d266acaba5e7ac50d06", - "blockNumber": "0x56e29e0", - "transactionIndex": "0x3" + "blockHash": "0xa617d003c0e933609e06147a3f4a03c957955b41e8a4957299506aa0c95b366b", + "blockNumber": "0x5c76695", + "transactionIndex": "0x1" } } \ No newline at end of file diff --git a/deployments/avalanche/Redeemer.json b/deployments/avalanche/Redeemer.json index 0d2ae68..3c56e15 100644 --- a/deployments/avalanche/Redeemer.json +++ b/deployments/avalanche/Redeemer.json @@ -1,5 +1,5 @@ { - "address": "0x8f1d81c0af5675e6ade9db1dbf03750310b0c2e3", + "address": "0x58426574855da7a8c47e1d134d51fd17dca5129b", "abi": [ { "inputs": [], @@ -78,6 +78,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "UnexpectedRedemptionTokens", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -179,6 +184,11 @@ "internalType": "uint256[]", "name": "minAmountOuts", "type": "uint256[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeem", @@ -224,6 +234,11 @@ "name": "forfeitTokens", "type": "address[]" }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" + }, { "internalType": "bytes", "name": "authData", @@ -272,6 +287,11 @@ "internalType": "address[]", "name": "forfeitTokens", "type": "address[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeemWithForfeit", @@ -317,8 +337,8 @@ ], "contractName": "Redeemer", "sourceName": "contracts/parallelizer/facets/Redeemer.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50613a5c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50613b148061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -347,10 +367,11 @@ "tokens": "List of tokens that would be given" } }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "details": "The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function", "params": { "deadline": "Timestamp before which the redemption should have occured", + "expectedTokensHash": "`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects", "minAmountOuts": "Minimum amount of each token given back in the redemption to obtain", "receiver": "Address which should be receiving the output tokens" }, @@ -359,10 +380,10 @@ "tokens": "List of tokens returned" } }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { - "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`." + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { + "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list" }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "details": "Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount" }, "updateNormalizer(uint256,bool)": { @@ -375,28 +396,28 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "2988000", - "executionCost": "3276", - "totalCost": "2991276" + "codeDepositCost": "3024800", + "executionCost": "3323", + "totalCost": "3028123" }, "external": { "quoteRedemptionCurve(uint256)": "infinite", - "redeem(uint256,address,uint256,uint256[])": "infinite", - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": "infinite", - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": "infinite", + "redeem(uint256,address,uint256,uint256[],bytes32)": "infinite", + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": "infinite", + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": "infinite", "updateNormalizer(uint256,bool)": "infinite" }, "internal": { - "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_distributeRedemption(struct Redeemer.RedemptionExecution memory)": "infinite", - "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_quoteRedemptionCurve(uint256)": "infinite", - "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_updateNormalizer(uint256,bool)": "infinite" } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[])\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[])\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the\\n /// signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x2ea4d5ebd3dd0e83071ebedb2c269f501f37033ddce9a1ee9ec40cfde0adfc7a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n _updateNormalizer(amount, false);\\n\\n redemption.from = _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(\\n redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config\\n );\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP)).receiveWithAuthorization(\\n params.from,\\n address(this),\\n params.value,\\n params.validAfter,\\n params.validBefore,\\n derivedNonce,\\n params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x52467df54a2a68910287c51c0ee42d304de44a7ccacd22fff8426911835356f3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe41991a0a564f4f6443aeffd6f1519ae3decc8a9e1e625f51ddf2168453ea4f2\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedRedemptionTokens\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"expectedTokensHash\":\"`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n // `minAmountOuts` is positional, so it only protects quantities. Binding the output list itself is what\\n // ties each minimum to the token it was quoted against, across a collateral rotation\\n if (keccak256(abi.encodePacked(redemption.tokens)) != expectedTokensHash) revert UnexpectedRedemptionTokens();\\n _updateNormalizer(amount, false);\\n\\n redemption.from =\\n _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config);\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP))\\n .receiveWithAuthorization(\\n params.from, address(this), params.value, params.validAfter, params.validBefore, derivedNonce, params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x1a67602de708b202cbfb4311b65c8e28294c043d059c53c66dcd9c7b1512d3c0\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 expectedTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d4;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the redemption output list the\\n /// authorizer was quoted, binding token identity and ordering rather than raw amounts alone\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n expectedTokensHash,\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x195b02224ec034756820857b7f88acc6ace194d00a68a9a6f0bcb8adf38963c8\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -407,13 +428,13 @@ "quoteRedemptionCurve(uint256)": { "notice": "Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block" }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "notice": "Redeems `amount` of stablecoins from the system" }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { "notice": "Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer." }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "notice": "Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`." }, "updateNormalizer(uint256,bool)": { @@ -424,13 +445,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0xacd73e1f5740801b5ad328440c036aa34088508b704873474600ab6e15c79bfc", - "nonce": "0xc7", + "hash": "0x9353db33ba248005a23c46a3277a91ba7126449c13f5024b01edec342831fd8c", + "nonce": "0xe1", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0xa03c27fb23ea54408e37202102110b578f8162d89b79c6cd53a6cb961e28a3c0", - "blockNumber": "0x56e29e4", - "transactionIndex": "0x2" + "blockHash": "0xded6958adedbadbf9ac309ef54f73747b11700f307bc306c8ad6a2d93f7d900d", + "blockNumber": "0x5c76698", + "transactionIndex": "0x0" } } \ No newline at end of file diff --git a/deployments/avalanche/RewardHandler.json b/deployments/avalanche/RewardHandler.json index 4632066..0294b74 100644 --- a/deployments/avalanche/RewardHandler.json +++ b/deployments/avalanche/RewardHandler.json @@ -1,5 +1,5 @@ { - "address": "0x9d4a036cb8823f91e80eaac39295a1a302ca5f9f", + "address": "0x4731f7c0a3b670f78ccb2e3620ae636465ca5279", "abi": [ { "inputs": [], @@ -18,12 +18,12 @@ }, { "inputs": [], - "name": "OdosSwapFailed", + "name": "ReentrantCall", "type": "error" }, { "inputs": [], - "name": "ReentrantCall", + "name": "RewardSwapFailed", "type": "error" }, { @@ -42,6 +42,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -88,8 +93,8 @@ ], "contractName": "RewardHandler", "sourceName": "contracts/parallelizer/facets/RewardHandler.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50610fa08061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50610fd38061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -108,7 +113,7 @@ "kind": "dev", "methods": { "sellRewards(uint256,bytes)": { - "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped" + "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped" } }, "title": "RewardHandler", @@ -117,9 +122,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "800000", - "executionCost": "829", - "totalCost": "800829" + "codeDepositCost": "810200", + "executionCost": "842", + "totalCost": "811042" }, "external": { "sellRewards(uint256,bytes)": "infinite" @@ -129,7 +134,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OdosSwapFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a odos call\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to odos\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xff2afcbc8d1c25297324159d3684a323e60b3c9408129aba70d3d6938d093255\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to Odos router for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = ODOS_ROUTER.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes odos revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert OdosSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xf01917011b3966f1783fa024ce6c56b5294ef0f65531bdc3f2e068649cd45038\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardSwapFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to the configured `swapRouter` for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n address swapRouter = ts.swapRouter;\\n if (swapRouter == address(0)) revert ZeroAddress();\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = swapRouter.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes the router's revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert RewardSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xa4e2fdeaaa43d78dfe1a81f458108856ebc92f27a7194e6293ac3c5084325beb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -145,13 +150,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0xea0100366ae27eb0dd8165d7bb8b98efb15a8a06d200f0e02ab04dfe3ad4704d", - "nonce": "0xc8", + "hash": "0x5bdae46acb4d5290b3abc2c1d51e0f6c1d0e257235d33dee1b55278718b30261", + "nonce": "0xe2", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0x9d83f9a0db2d0682390aba664cb2c1217b732fc9391978f1fc7fab07883afb07", - "blockNumber": "0x56e29e6", + "blockHash": "0x298dfd62dae749105c12cfbea3402c63ae39c9b0c45d34b230e64430109b507a", + "blockNumber": "0x5c7669a", "transactionIndex": "0x1" } } \ No newline at end of file diff --git a/deployments/avalanche/SettersGovernor.json b/deployments/avalanche/SettersGovernor.json index 91507d7..6145cbf 100644 --- a/deployments/avalanche/SettersGovernor.json +++ b/deployments/avalanche/SettersGovernor.json @@ -1,5 +1,5 @@ { - "address": "0xe9b09cc151fcc7f6a1347098ed305b02f46b17b8", + "address": "0xbef8dd3e729a081855ae7a5fcc5b6373f75d1ba9", "abi": [ { "inputs": [], @@ -57,6 +57,11 @@ "name": "InvalidParams", "type": "error" }, + { + "inputs": [], + "name": "InvalidPayee", + "type": "error" + }, { "inputs": [], "name": "InvalidRate", @@ -135,6 +140,11 @@ "name": "SafeERC20FailedOperation", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "inputs": [], "name": "ZeroAmount", @@ -285,6 +295,31 @@ "name": "OracleSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousTarget", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTarget", + "type": "uint256" + } + ], + "name": "OracleTargetUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -405,6 +440,19 @@ "name": "SurplusBufferRatioUpdated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -601,6 +649,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -712,8 +773,8 @@ ], "contractName": "SettersGovernor", "sourceName": "contracts/parallelizer/facets/SettersGovernor.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061417d8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506143348061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -759,6 +820,9 @@ "setCollateralManager(address,bool,(address[],bytes))": { "details": "Funds need to have been withdrawn from the eventual previous manager prior to this call" }, + "setSwapRouter(address)": { + "details": "The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold" + }, "updatePayees(address[],uint256[],bool)": { "params": { "_payees": "The new payee addresses", @@ -782,9 +846,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3353000", - "executionCost": "3729", - "totalCost": "3356729" + "codeDepositCost": "3440800", + "executionCost": "3842", + "totalCost": "3444642" }, "external": { "addCollateral(address)": "infinite", @@ -795,6 +859,7 @@ "setAccessManager(address)": "infinite", "setCollateralManager(address,bool,(address[],bytes))": "infinite", "setOracle(address,bytes)": "infinite", + "setSwapRouter(address)": "infinite", "setWhitelistStatus(address,uint8,bytes)": "infinite", "toggleTrusted(address,uint8)": "infinite", "updateOracle(address)": "infinite", @@ -804,12 +869,17 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xd4d195b62841c28dd5f248d09e682c3c81bda24b471cd8a5d8efe498519ea50d\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n}\\n\",\"keccak256\":\"0x3d0d0351ef8f06a401c421d2f76b4227e4819935583ad29f44fc6dc59f5ea021\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x9e41915e7fb03ef3b054f7ce0b7ab297e3b8f5c05ab1e7ebe072e22f11b22362\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousTarget\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTarget\",\"type\":\"uint256\"}],\"name\":\"OracleTargetUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"setSwapRouter(address)\":{\"details\":\"The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"events\":{\"OracleTargetUpdated(address,uint256,uint256)\":{\"notice\":\"Emitted when a MAX target price is ratcheted up by `updateOracle`\"}},\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setSwapRouter(address)\":{\"notice\":\"Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setSwapRouter(address swapRouter) external restricted {\\n LibSetters.setSwapRouter(swapRouter);\\n }\\n}\\n\",\"keccak256\":\"0x7c64a27bfb326989b6fdc21b3982ef5ce95aa2a576a4edc6d8334a8820f3b8fb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n event SwapRouterUpdated(address indexed swapRouter);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `setSwapRouter`\\n function setSwapRouter(address swapRouter) internal {\\n if (swapRouter == address(0)) revert ZeroAddress();\\n s.transmuterStorage().swapRouter = swapRouter;\\n emit SwapRouterUpdated(swapRouter);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n // The Parallelizer holds the income being distributed, so a share allocated to itself is handed\\n // back to `release` as fresh income on the next call. `address(0)` stays valid: `LibSurplus`\\n // treats it as the sentinel for burning that share.\\n if (_payee == address(this)) revert InvalidPayee();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x45ed1863aec8d20f3659d2b0ea657b629b5c33b71f895ae6775ea72156203197\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null }, "userdoc": { + "events": { + "OracleTargetUpdated(address,uint256,uint256)": { + "notice": "Emitted when a MAX target price is ratcheted up by `updateOracle`" + } + }, "kind": "user", "methods": { "addCollateral(address)": { @@ -836,6 +906,9 @@ "setOracle(address,bytes)": { "notice": "Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations" }, + "setSwapRouter(address)": { + "notice": "Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to" + }, "setWhitelistStatus(address,uint8,bytes)": { "notice": "Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist" }, @@ -859,13 +932,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0xfb091a00aadea9cf54b65b9fcb744a358b7370de3abab4adf9d529ee54a25db7", - "nonce": "0xc3", + "hash": "0x40f801f383cda7f46bb2b357fbcaf586b3f926bd522ba6e90a7f2a9838440461", + "nonce": "0xdf", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0x57d3cc6ba3b3be9dc3190557e8e8bc06fba4b527a1c4d2099bba74d908dc0f05", - "blockNumber": "0x56e29d9", - "transactionIndex": "0x6" + "blockHash": "0xa194fda89069cf1af4ee9ace3d0842b46e13ad0969140c8688cf31e2ef7bf8b9", + "blockNumber": "0x5c76692", + "transactionIndex": "0xd" } } \ No newline at end of file diff --git a/deployments/base/GenericRebalancer_USDp.json b/deployments/base/GenericRebalancer_USDp.json new file mode 100644 index 0000000..9eaf281 --- /dev/null +++ b/deployments/base/GenericRebalancer_USDp.json @@ -0,0 +1,1228 @@ +{ + "address": "0x10ca75cf3a2198d5571148949ef4531b2d57de7d", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialTokenTransferAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "initialSwapRouter", + "type": "address" + }, + { + "internalType": "contract ITokenP", + "name": "definitivetokenP", + "type": "address" + }, + { + "internalType": "contract IParallelizer", + "name": "definitiveParallelizer", + "type": "address" + }, + { + "internalType": "address", + "name": "initialAuthority", + "type": "address" + }, + { + "internalType": "contract IERC3156FlashLender", + "name": "definitiveFlashloan", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AccessManagedInvalidAuthority", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "name": "AccessManagedRequiredDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessManagedUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParam", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrusted", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrustedOrGuardian", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SwapError", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "AllowanceReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "TokenTransferAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "trusted", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "TrustedToggled", + "type": "event" + }, + { + "inputs": [], + "name": "CALLBACK_SUCCESS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "addBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "budget", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "computeRebalanceAmount", + "outputs": [ + { + "internalType": "uint8", + "name": "increase", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "flashloan", + "outputs": [ + { + "internalType": "contract IERC3156FlashLender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "scale", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "harvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isTrusted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onFlashLoan", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "parallelizer", + "outputs": [ + { + "internalType": "contract IParallelizer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToRecover", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "removeBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "resetAllowance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "newMaxSlippage", + "type": "uint64" + } + ], + "name": "setMaxSlippage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + } + ], + "name": "setTargetExposure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "setTokenTransferAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "name": "setYieldBearingAssetData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "swapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trusted", + "type": "address" + } + ], + "name": "toggleTrusted", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokenP", + "outputs": [ + { + "internalType": "contract ITokenP", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenTransferAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "updateLimitExposuresYieldAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "yieldBearingData", + "outputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contractName": "GenericRebalancer", + "sourceName": "contracts/helpers/GenericRebalancer.sol", + "bytecode": "0x60e060405234801561000f575f5ffd5b5060405161327238038061327283398101604081905261002e9161018c565b84868386868261003d81610122565b506001600160a01b0391821660a0528116608052600380549482166001600160a01b03199586161790556004805493821693909416929092179092558216905061009a5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0381811660c081905260a05160405163095ea7b360e01b815260048101929092525f1960248301529091169063095ea7b3906044016020604051808303815f875af11580156100f2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610116919061020f565b50505050505050610235565b5f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6001600160a01b0381168114610189575f5ffd5b50565b5f5f5f5f5f5f60c087890312156101a1575f5ffd5b86516101ac81610175565b60208801519096506101bd81610175565b60408801519095506101ce81610175565b60608801519094506101df81610175565b60808801519093506101f081610175565b60a088015190925061020181610175565b809150509295509295509295565b5f6020828403121561021f575f5ffd5b8151801515811461022e575f5ffd5b9392505050565b60805160a05160c051612f956102dd5f395f818161021a015281816106110152611f5a01525f81816101d6015281816105d9015281816107390152818161085901528181610e83015281816117710152611f8a01525f818161027501528181610779015281816108070152818161088f0152818161107901528181611720015281816117a5015281816118cc0152818161195d01528181611bd90152611cfb0152612f955ff3fe608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": { + "10252": [ + { + "length": 32, + "start": 629 + }, + { + "length": 32, + "start": 1913 + }, + { + "length": 32, + "start": 2055 + }, + { + "length": 32, + "start": 2191 + }, + { + "length": 32, + "start": 4217 + }, + { + "length": 32, + "start": 5920 + }, + { + "length": 32, + "start": 6053 + }, + { + "length": 32, + "start": 6348 + }, + { + "length": 32, + "start": 6493 + }, + { + "length": 32, + "start": 7129 + }, + { + "length": 32, + "start": 7419 + } + ], + "10256": [ + { + "length": 32, + "start": 470 + }, + { + "length": 32, + "start": 1497 + }, + { + "length": 32, + "start": 1849 + }, + { + "length": 32, + "start": 2137 + }, + { + "length": 32, + "start": 3715 + }, + { + "length": 32, + "start": 6001 + }, + { + "length": 32, + "start": 8074 + } + ], + "11053": [ + { + "length": 32, + "start": 538 + }, + { + "length": 32, + "start": 1553 + }, + { + "length": 32, + "start": 8026 + } + ] + }, + "inputSourceName": "project/contracts/helpers/GenericRebalancer.sol", + "devdoc": { + "author": "Cooper Labs", + "custom:contact": "security@cooperlabs.xyz", + "details": "Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol", + "errors": { + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC-20 token failed." + } + ] + }, + "events": { + "AuthorityUpdated(address)": { + "details": "Authority that manages this contract was updated." + } + }, + "kind": "dev", + "methods": { + "addBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to add to the budget", + "receiver": "address of the receiver" + } + }, + "authority()": { + "details": "Returns the current authority." + }, + "computeRebalanceAmount(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + }, + "returns": { + "amount": "amount to be rebalanced", + "increase": "whether the exposure should be increased" + } + }, + "harvest(address,uint256,bytes)": { + "details": "This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers" + }, + "isConsumingScheduledOp()": { + "details": "Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls." + }, + "onFlashLoan(address,address,uint256,uint256,bytes)": { + "details": "A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back", + "params": { + "amount": "The amount of tokens lent.", + "data": "Arbitrary data structure, intended to contain user-defined parameters.", + "fee": "The additional amount of tokens to repay.", + "initiator": "The initiator of the loan.", + "token": "The loan currency." + }, + "returns": { + "_0": "The keccak256 hash of \"ERC3156FlashBorrower.onFlashLoan\"" + } + }, + "recoverERC20(address,uint256,address)": { + "params": { + "amountToRecover": "amount to recover", + "to": "address to send the recovered tokens", + "tokenAddress": "address of the token to recover" + } + }, + "removeBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to remove from the budget", + "receiver": "address of the receiver" + } + }, + "resetAllowance(address,address)": { + "details": "Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.", + "params": { + "spender": "address losing the allowance", + "token": "address of the token" + } + }, + "setAuthority(address)": { + "details": "Transfers control to a new authority. The caller must be the current authority." + }, + "setMaxSlippage(address,uint64)": { + "params": { + "newMaxSlippage": "new max allowed slippage" + } + }, + "setSwapRouter(address)": { + "params": { + "newSwapRouter": "address of the swap router" + } + }, + "setTargetExposure(address,uint64)": { + "params": { + "targetExposure": "target exposure to the yield bearing asset used", + "yieldBearingAsset": "address of the yield bearing asset" + } + }, + "setTokenTransferAddress(address)": { + "params": { + "newTokenTransferAddress": "address of the token transfer contract" + } + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "params": { + "asset": "address of the asset", + "maxExposure": "maximum exposure within the Parallelizer to the asset", + "minExposure": "minimum exposure within the Parallelizer to the asset", + "overrideExposures": "whether limit exposures should be overriden or read onchain through the Parallelizer", + "targetExposure": "target exposure to the yieldBearingAsset asset used", + "yieldBearingAsset": "address of the yieldBearingAsset" + } + }, + "toggleTrusted(address)": { + "params": { + "trusted": "address to toggle the trusted status" + } + }, + "updateLimitExposuresYieldAsset(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + } + } + }, + "title": "GenericRebalancer", + "version": 1 + }, + "evm": { + "gasEstimates": { + "creation": { + "codeDepositCost": "2436200", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "CALLBACK_SUCCESS()": "240", + "addBudget(uint256,address)": "infinite", + "authority()": "2407", + "budget(address)": "2554", + "computeRebalanceAmount(address)": "infinite", + "flashloan()": "infinite", + "harvest(address,uint256,bytes)": "infinite", + "isConsumingScheduledOp()": "2442", + "isTrusted(address)": "2612", + "onFlashLoan(address,address,uint256,uint256,bytes)": "infinite", + "parallelizer()": "infinite", + "recoverERC20(address,uint256,address)": "infinite", + "removeBudget(uint256,address)": "infinite", + "resetAllowance(address,address)": "infinite", + "setAuthority(address)": "30486", + "setMaxSlippage(address,uint64)": "infinite", + "setSwapRouter(address)": "infinite", + "setTargetExposure(address,uint64)": "infinite", + "setTokenTransferAddress(address)": "infinite", + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": "infinite", + "swapRouter()": "2392", + "toggleTrusted(address)": "infinite", + "tokenP()": "infinite", + "tokenTransferAddress()": "2415", + "updateLimitExposuresYieldAsset(address)": "infinite", + "yieldBearingData(address)": "5001" + }, + "internal": { + "_adjustYieldExposure(uint256,uint8,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_recoverResidualInput(address,uint256)": "infinite", + "_swapToTokenOut(uint256,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_swapToTokenOutSwap(address,address,uint256,bytes memory)": "infinite", + "_swapToTokenOutVault(uint256,address,address,uint256)": "infinite" + } + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialTokenTransferAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialSwapRouter\",\"type\":\"address\"},{\"internalType\":\"contract ITokenP\",\"name\":\"definitivetokenP\",\"type\":\"address\"},{\"internalType\":\"contract IParallelizer\",\"name\":\"definitiveParallelizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialAuthority\",\"type\":\"address\"},{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"definitiveFlashloan\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AccessManagedInvalidAuthority\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"delay\",\"type\":\"uint32\"}],\"name\":\"AccessManagedRequiredDelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrustedOrGuardian\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SwapError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"AllowanceReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"TokenTransferAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CALLBACK_SUCCESS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"addBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"budget\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"computeRebalanceAmount\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"increase\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flashloan\",\"outputs\":[{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"harvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onFlashLoan\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parallelizer\",\"outputs\":[{\"internalType\":\"contract IParallelizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountToRecover\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"removeBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"resetAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"newMaxSlippage\",\"type\":\"uint64\"}],\"name\":\"setMaxSlippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"}],\"name\":\"setTargetExposure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"setTokenTransferAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"name\":\"setYieldBearingAssetData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenTransferAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"updateLimitExposuresYieldAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"yieldBearingData\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"AuthorityUpdated(address)\":{\"details\":\"Authority that manages this contract was updated.\"}},\"kind\":\"dev\",\"methods\":{\"addBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to add to the budget\",\"receiver\":\"address of the receiver\"}},\"authority()\":{\"details\":\"Returns the current authority.\"},\"computeRebalanceAmount(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"},\"returns\":{\"amount\":\"amount to be rebalanced\",\"increase\":\"whether the exposure should be increased\"}},\"harvest(address,uint256,bytes)\":{\"details\":\"This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"onFlashLoan(address,address,uint256,uint256,bytes)\":{\"details\":\"A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back\",\"params\":{\"amount\":\"The amount of tokens lent.\",\"data\":\"Arbitrary data structure, intended to contain user-defined parameters.\",\"fee\":\"The additional amount of tokens to repay.\",\"initiator\":\"The initiator of the loan.\",\"token\":\"The loan currency.\"},\"returns\":{\"_0\":\"The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\"}},\"recoverERC20(address,uint256,address)\":{\"params\":{\"amountToRecover\":\"amount to recover\",\"to\":\"address to send the recovered tokens\",\"tokenAddress\":\"address of the token to recover\"}},\"removeBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to remove from the budget\",\"receiver\":\"address of the receiver\"}},\"resetAllowance(address,address)\":{\"details\":\"Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.\",\"params\":{\"spender\":\"address losing the allowance\",\"token\":\"address of the token\"}},\"setAuthority(address)\":{\"details\":\"Transfers control to a new authority. The caller must be the current authority.\"},\"setMaxSlippage(address,uint64)\":{\"params\":{\"newMaxSlippage\":\"new max allowed slippage\"}},\"setSwapRouter(address)\":{\"params\":{\"newSwapRouter\":\"address of the swap router\"}},\"setTargetExposure(address,uint64)\":{\"params\":{\"targetExposure\":\"target exposure to the yield bearing asset used\",\"yieldBearingAsset\":\"address of the yield bearing asset\"}},\"setTokenTransferAddress(address)\":{\"params\":{\"newTokenTransferAddress\":\"address of the token transfer contract\"}},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"params\":{\"asset\":\"address of the asset\",\"maxExposure\":\"maximum exposure within the Parallelizer to the asset\",\"minExposure\":\"minimum exposure within the Parallelizer to the asset\",\"overrideExposures\":\"whether limit exposures should be overriden or read onchain through the Parallelizer\",\"targetExposure\":\"target exposure to the yieldBearingAsset asset used\",\"yieldBearingAsset\":\"address of the yieldBearingAsset\"}},\"toggleTrusted(address)\":{\"params\":{\"trusted\":\"address to toggle the trusted status\"}},\"updateLimitExposuresYieldAsset(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"}}},\"title\":\"GenericRebalancer\",\"version\":1},\"userdoc\":{\"events\":{\"SwapRouterUpdated(address)\":{\"notice\":\"Event emitted when the swap router is updated\"},\"TokenTransferAddressUpdated(address)\":{\"notice\":\"Event emitted when the token proxy is updated\"}},\"kind\":\"user\",\"methods\":{\"addBudget(uint256,address)\":{\"notice\":\"Add budget to be spent by the receiver during the flashloan\"},\"budget(address)\":{\"notice\":\"Budget of tokenP available for each users\"},\"computeRebalanceAmount(address)\":{\"notice\":\"Compute the amount needed to rebalance the Parallelizer\"},\"flashloan()\":{\"notice\":\"Parallel stablecoin flashloan contract\"},\"harvest(address,uint256,bytes)\":{\"notice\":\"Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset\"},\"isTrusted(address)\":{\"notice\":\"trusted addresses that can update target exposure and do others non critical operations\"},\"parallelizer()\":{\"notice\":\"Reference to the `parallelizer` implementation this contract aims at rebalancing\"},\"recoverERC20(address,uint256,address)\":{\"notice\":\"Recover ERC20 tokens\"},\"removeBudget(uint256,address)\":{\"notice\":\"Remove budget from the owner and send it to the receiver\"},\"resetAllowance(address,address)\":{\"notice\":\"Set an allowance this contract granted back to zero\"},\"setMaxSlippage(address,uint64)\":{\"notice\":\"Set the max allowed slippage\"},\"setSwapRouter(address)\":{\"notice\":\"Set the swap router\"},\"setTargetExposure(address,uint64)\":{\"notice\":\"Set the target exposure of a yield bearing asset\"},\"setTokenTransferAddress(address)\":{\"notice\":\"Set the token transfer address\"},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"notice\":\"Set the yieldBearingAsset data\"},\"swapRouter()\":{\"notice\":\"address of the router/aggregator\"},\"toggleTrusted(address)\":{\"notice\":\"Toggle the trusted status of an address\"},\"tokenP()\":{\"notice\":\"TokenP handled by the `parallelizer` of interest\"},\"tokenTransferAddress()\":{\"notice\":\"address to approve to transfer tokens to\"},\"updateLimitExposuresYieldAsset(address)\":{\"notice\":\"Set the limit exposures to the asset linked to the yield bearing asset\"},\"yieldBearingData(address)\":{\"notice\":\"Data associated to a yield bearing asset\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/helpers/GenericRebalancer.sol\":\"GenericRebalancer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManaged.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManaged {\\n /**\\n * @dev Authority that manages this contract was updated.\\n */\\n event AuthorityUpdated(address authority);\\n\\n error AccessManagedUnauthorized(address caller);\\n error AccessManagedRequiredDelay(address caller, uint32 delay);\\n error AccessManagedInvalidAuthority(address authority);\\n\\n /**\\n * @dev Returns the current authority.\\n */\\n function authority() external view returns (address);\\n\\n /**\\n * @dev Transfers control to a new authority. The caller must be the current authority.\\n */\\n function setAuthority(address) external;\\n\\n /**\\n * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n * attacker controlled calls.\\n */\\n function isConsumingScheduledOp() external view returns (bytes4);\\n}\\n\",\"keccak256\":\"0x1121e070554cffc6d536f658332a1a3d65fb2ea5573cd774f4ecbd02a2fcf4b7\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashBorrower.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashBorrower.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashBorrower, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashBorrower {\\n /**\\n * @dev Receive a flash loan.\\n * @param initiator The initiator of the loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param fee The additional amount of tokens to repay.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n * @return The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\\n */\\n function onFlashLoan(\\n address initiator,\\n address token,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n ) external returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e4b982b56b50290dd1dcaa2fef1178b1574dfc7c0f0a8ef9cb68a207d72582e\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashLender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashLender.sol)\\n\\npragma solidity >=0.5.0;\\n\\nimport {IERC3156FlashBorrower} from \\\"./IERC3156FlashBorrower.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashLender, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashLender {\\n /**\\n * @dev The amount of currency available to be lended.\\n * @param token The loan currency.\\n * @return The amount of `token` that can be borrowed.\\n */\\n function maxFlashLoan(address token) external view returns (uint256);\\n\\n /**\\n * @dev The fee to be charged for a given loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @return The amount of `token` to be charged for the loan, on top of the returned principal.\\n */\\n function flashFee(address token, uint256 amount) external view returns (uint256);\\n\\n /**\\n * @dev Initiate a flash loan.\\n * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n */\\n function flashLoan(\\n IERC3156FlashBorrower receiver,\\n address token,\\n uint256 amount,\\n bytes calldata data\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x218d708e7d8df417db24a497727eefb7772e61c7cde3886fc42bbcb6aafa6947\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/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\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/helpers/BaseRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { AccessManaged } from \\\"../utils/AccessManaged.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport \\\"contracts/interfaces/IRebalancer.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nstruct YieldBearingParams {\\n // Address of the asset used to mint the yield bearing asset\\n address asset;\\n // Target exposure to the collateral yield bearing asset used\\n uint64 targetExposure;\\n // Maximum exposure within the Parallelizer to the deposit asset\\n uint64 maxExposure;\\n // Minimum exposure within the Parallelizer to the deposit asset\\n uint64 minExposure;\\n // Whether limit exposures should be overriden or read onchain through the Parallelizer\\n // This value should be 1 to override exposures or 2 if these shouldn't be overriden\\n uint64 overrideExposures;\\n // Maximum slippage when dealing with the Parallelizer, bounded below 1e9 so uint64 leaves the\\n // struct packed in two slots\\n uint64 maxSlippage;\\n}\\n\\n/// @title BaseRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Abstract contract for a rebalancer that aims at rebalancing a Parallelizer\\n/// @dev This contract is an authorized fork of Angle's BaseHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/BaseHarvester.sol\\nabstract contract BaseRebalancer is IRebalancer, AccessManaged {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrusted() {\\n if (!isTrusted[msg.sender]) revert NotTrusted();\\n _;\\n }\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted or guardian to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrustedOrRestricted() {\\n if (!isTrusted[msg.sender] && !_checkCanCall(_msgSender(), _msgData())) {\\n revert NotTrustedOrGuardian();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VARIABLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reference to the `parallelizer` implementation this contract aims at rebalancing\\n IParallelizer public immutable parallelizer;\\n /// @notice TokenP handled by the `parallelizer` of interest\\n ITokenP public immutable tokenP;\\n /// @notice Data associated to a yield bearing asset\\n mapping(address => YieldBearingParams) public yieldBearingData;\\n /// @notice trusted addresses that can update target exposure and do others non critical operations\\n mapping(address => bool) public isTrusted;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EVENTS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n event Recovered(address token, uint256 amount, address to);\\n event TrustedToggled(address trusted, bool status);\\n event AllowanceReset(address indexed token, address indexed spender);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialAuthority,\\n ITokenP definitiveTokenP,\\n IParallelizer definitiveParallelizer\\n )\\n AccessManaged(initialAuthority)\\n {\\n tokenP = definitiveTokenP;\\n parallelizer = definitiveParallelizer;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n GUARDIAN FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the yieldBearingAsset data\\n * @param yieldBearingAsset address of the yieldBearingAsset\\n * @param asset address of the asset\\n * @param targetExposure target exposure to the yieldBearingAsset asset used\\n * @param minExposure minimum exposure within the Parallelizer to the asset\\n * @param maxExposure maximum exposure within the Parallelizer to the asset\\n * @param overrideExposures whether limit exposures should be overriden or read onchain through the Parallelizer\\n */\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external\\n restricted\\n {\\n _setYieldBearingAssetData(\\n yieldBearingAsset, asset, targetExposure, minExposure, maxExposure, overrideExposures, maxSlippage\\n );\\n }\\n\\n /**\\n * @notice Set the limit exposures to the asset linked to the yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n */\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) public virtual {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n if (yieldBearingInfo.overrideExposures == 2) {\\n _updateLimitExposuresYieldAsset(yieldBearingInfo.asset, yieldBearingInfo);\\n }\\n }\\n\\n /**\\n * @notice Set the max allowed slippage\\n * @param newMaxSlippage new max allowed slippage\\n */\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external restricted {\\n _setMaxSlippage(yieldBearingAsset, newMaxSlippage);\\n }\\n\\n /**\\n * @notice Toggle the trusted status of an address\\n * @param trusted address to toggle the trusted status\\n */\\n function toggleTrusted(address trusted) external restricted {\\n emit TrustedToggled(trusted, isTrusted[trusted]);\\n isTrusted[trusted] = !isTrusted[trusted];\\n }\\n\\n /**\\n * @notice Recover ERC20 tokens\\n * @param tokenAddress address of the token to recover\\n * @param amountToRecover amount to recover\\n * @param to address to send the recovered tokens\\n */\\n function recoverERC20(address tokenAddress, uint256 amountToRecover, address to) external restricted {\\n emit Recovered(tokenAddress, amountToRecover, to);\\n IERC20(tokenAddress).safeTransfer(to, amountToRecover);\\n }\\n\\n /**\\n * @notice Set an allowance this contract granted back to zero\\n * @param token address of the token\\n * @param spender address losing the allowance\\n * @dev Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing\\n * asset's configuration revokes the approvals it created, but this covers a spender that became\\n * untrusted for any other reason.\\n */\\n function resetAllowance(address token, address spender) external restricted {\\n IERC20(token).forceApprove(spender, 0);\\n emit AllowanceReset(token, spender);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n TRUSTED FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the target exposure of a yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @param targetExposure target exposure to the yield bearing asset used\\n */\\n function setTargetExposure(address yieldBearingAsset, uint64 targetExposure) external onlyTrustedOrRestricted {\\n yieldBearingData[yieldBearingAsset].targetExposure = targetExposure;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Compute the amount needed to rebalance the Parallelizer\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @return increase whether the exposure should be increased\\n * @return amount amount to be rebalanced\\n */\\n function computeRebalanceAmount(address yieldBearingAsset) external view returns (uint8 increase, uint256 amount) {\\n return _computeRebalanceAmount(yieldBearingAsset, yieldBearingData[yieldBearingAsset]);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _computeRebalanceAmount(\\n address yieldBearingAsset,\\n YieldBearingParams memory yieldBearingInfo\\n )\\n internal\\n view\\n returns (uint8 increase, uint256 amount)\\n {\\n (uint256 stablecoinsFromYieldBearingAsset, uint256 stablecoinsIssued) =\\n parallelizer.getIssuedByCollateral(yieldBearingAsset);\\n (uint256 stablecoinsFromAsset,) = parallelizer.getIssuedByCollateral(yieldBearingInfo.asset);\\n uint256 targetExposureScaled = yieldBearingInfo.targetExposure * stablecoinsIssued;\\n if (stablecoinsFromYieldBearingAsset * 1e9 > targetExposureScaled) {\\n // Need to decrease exposure to yield bearing asset\\n amount = stablecoinsFromYieldBearingAsset - targetExposureScaled / 1e9;\\n uint256 maxValueScaled = yieldBearingInfo.maxExposure * stablecoinsIssued;\\n // These checks assume that there are no transaction fees on the stablecoin->collateral conversion and so\\n // it's still possible that exposure goes above the max exposure in some rare cases\\n if (stablecoinsFromAsset * 1e9 > maxValueScaled) {\\n amount = 0;\\n } else if ((stablecoinsFromAsset + amount) * 1e9 > maxValueScaled) {\\n amount = maxValueScaled / 1e9 - stablecoinsFromAsset;\\n }\\n } else {\\n // In this case, exposure after the operation might remain slightly below the targetExposure as less\\n // collateral may be obtained by burning stablecoins for the yield asset and unwrapping it\\n increase = 1;\\n amount = targetExposureScaled / 1e9 - stablecoinsFromYieldBearingAsset;\\n uint256 minValueScaled = yieldBearingInfo.minExposure * stablecoinsIssued;\\n if (stablecoinsFromAsset * 1e9 < minValueScaled) {\\n amount = 0;\\n } else if (stablecoinsFromAsset * 1e9 < minValueScaled + amount * 1e9) {\\n amount = stablecoinsFromAsset - minValueScaled / 1e9;\\n }\\n }\\n }\\n\\n function _setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n internal\\n virtual\\n {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n address previousAsset = yieldBearingInfo.asset;\\n // Allowances are granted without expiry, so the outgoing asset would keep the yield bearing\\n // vault authorised over any of it later held here\\n if (previousAsset != address(0) && previousAsset != asset) {\\n IERC20(previousAsset).forceApprove(yieldBearingAsset, 0);\\n emit AllowanceReset(previousAsset, yieldBearingAsset);\\n _revokeAssetAllowances(yieldBearingAsset, previousAsset);\\n }\\n yieldBearingInfo.asset = asset;\\n if (targetExposure >= 1e9) revert InvalidParam();\\n if (maxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingInfo.targetExposure = targetExposure;\\n yieldBearingInfo.overrideExposures = overrideExposures;\\n yieldBearingInfo.maxSlippage = maxSlippage;\\n if (overrideExposures == 1) {\\n if (maxExposure >= 1e9 || minExposure >= maxExposure) revert InvalidParam();\\n yieldBearingInfo.maxExposure = maxExposure;\\n yieldBearingInfo.minExposure = minExposure;\\n } else {\\n yieldBearingInfo.overrideExposures = 2;\\n _updateLimitExposuresYieldAsset(asset, yieldBearingInfo);\\n }\\n }\\n\\n /// @notice Lets a rebalancer revoke the allowances it granted over an asset being rotated out\\n function _revokeAssetAllowances(address yieldBearingAsset, address previousAsset) internal virtual { }\\n\\n function _updateLimitExposuresYieldAsset(\\n address asset,\\n YieldBearingParams storage yieldBearingInfo\\n )\\n internal\\n virtual\\n {\\n uint64[] memory xFeeMint;\\n (xFeeMint,) = parallelizer.getCollateralMintFees(asset);\\n uint256 length = xFeeMint.length;\\n if (length <= 1) yieldBearingInfo.maxExposure = 1e9;\\n else yieldBearingInfo.maxExposure = xFeeMint[length - 2];\\n\\n uint64[] memory xFeeBurn;\\n (xFeeBurn,) = parallelizer.getCollateralBurnFees(asset);\\n length = xFeeBurn.length;\\n if (length <= 1) yieldBearingInfo.minExposure = 0;\\n else yieldBearingInfo.minExposure = xFeeBurn[length - 2];\\n }\\n\\n function _setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) internal virtual {\\n if (newMaxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingData[yieldBearingAsset].maxSlippage = newMaxSlippage;\\n }\\n\\n function _scaleAmountBasedOnDecimals(\\n uint256 decimalsTokenIn,\\n uint256 decimalsTokenOut,\\n uint256 amountIn,\\n bool assetIn\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (decimalsTokenIn > decimalsTokenOut) {\\n if (assetIn) {\\n amountIn /= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n } else {\\n amountIn *= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n }\\n } else if (decimalsTokenIn < decimalsTokenOut) {\\n if (assetIn) {\\n amountIn *= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n } else {\\n amountIn /= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n }\\n }\\n return amountIn;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPER \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _adjustAllowance(address token, address sender, uint256 amountIn) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), sender);\\n if (allowance < amountIn) IERC20(token).safeIncreaseAllowance(sender, type(uint256).max - allowance);\\n }\\n}\\n\",\"keccak256\":\"0x5d05479be1ac7d1dc738cb8fc2e539c82e88a2191dee278cc74fd647eed17ebc\",\"license\":\"GPL-3.0\"},\"project/contracts/helpers/GenericRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC3156FlashBorrower } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol\\\";\\nimport { IERC3156FlashLender } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol\\\";\\nimport { RouterSwapper } from \\\"@helpers/RouterSwapper.sol\\\";\\n\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IERC4626 } from \\\"contracts/interfaces/external/IERC4626.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nimport { BaseRebalancer, YieldBearingParams } from \\\"./BaseRebalancer.sol\\\";\\n\\nenum SwapType {\\n VAULT,\\n SWAP\\n}\\n\\n/// @title GenericRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Generic contract for trusted callers to adjust the reserves of Angle Parallelizer\\n/// @dev This contract is an authorized fork of Angle's GenericHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\\ncontract GenericRebalancer is BaseRebalancer, IERC3156FlashBorrower, RouterSwapper {\\n using SafeCast for uint256;\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant CALLBACK_SUCCESS = keccak256(\\\"ERC3156FlashBorrower.onFlashLoan\\\");\\n\\n /// @notice Parallel stablecoin flashloan contract\\n IERC3156FlashLender public immutable flashloan;\\n /// @notice Budget of tokenP available for each users\\n mapping(address => uint256) public budget;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INITIALIZATION \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialTokenTransferAddress,\\n address initialSwapRouter,\\n ITokenP definitivetokenP,\\n IParallelizer definitiveParallelizer,\\n address initialAuthority,\\n IERC3156FlashLender definitiveFlashloan\\n )\\n RouterSwapper(initialSwapRouter, initialTokenTransferAddress)\\n BaseRebalancer(initialAuthority, definitivetokenP, definitiveParallelizer)\\n {\\n if (address(definitiveFlashloan) == address(0)) revert ZeroAddress();\\n flashloan = definitiveFlashloan;\\n\\n IERC20(tokenP).approve(address(definitiveFlashloan), type(uint256).max);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n BUDGET HANDLING\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Add budget to be spent by the receiver during the flashloan\\n * @param amount amount of tokenP to add to the budget\\n * @param receiver address of the receiver\\n */\\n function addBudget(uint256 amount, address receiver) public virtual {\\n budget[receiver] += amount;\\n\\n IERC20(tokenP).safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Remove budget from the owner and send it to the receiver\\n * @param amount amount of tokenP to remove from the budget\\n * @param receiver address of the receiver\\n */\\n function removeBudget(uint256 amount, address receiver) public virtual {\\n budget[msg.sender] -= amount; // Will revert if not enough funds\\n\\n IERC20(tokenP).safeTransfer(receiver, amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HARVEST\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure\\n /// to this yieldBearingAsset\\n /// @dev This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up\\n /// some yieldBearingAsset that can then be used for people looking to burn deposit tokens\\n /// @dev Due to potential transaction fees within the Parallelizer, this function doesn't exactly bring\\n /// `yieldBearingAsset` to the target exposure\\n /// @dev scale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest,\\n /// it is used to lower the amount of the asset to harvest for example to have a lower slippage\\n /// @dev Restricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the\\n /// collateral oracle, neither of which can be safely exposed to arbitrary callers\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) public virtual onlyTrusted {\\n if (scale > 1e9) revert InvalidParam();\\n updateLimitExposuresYieldAsset(yieldBearingAsset);\\n YieldBearingParams memory yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n (uint8 increase, uint256 amount) = _computeRebalanceAmount(yieldBearingAsset, yieldBearingInfo);\\n amount = (amount * scale) / 1e9;\\n if (amount == 0) revert ZeroAmount();\\n (SwapType swapType, bytes memory data) = abi.decode(extraData, (SwapType, bytes));\\n try parallelizer.updateOracle(yieldBearingAsset) { } catch { }\\n _adjustYieldExposure(\\n amount,\\n increase,\\n yieldBearingAsset,\\n yieldBearingInfo.asset,\\n (amount * (1e9 - yieldBearingInfo.maxSlippage)) / 1e9,\\n swapType,\\n data\\n );\\n }\\n\\n /// @inheritdoc IERC3156FlashBorrower\\n /// @dev A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any\\n /// shortfall between the principal and the tokenP the rebalance minted back\\n function onFlashLoan(\\n address initiator,\\n address,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n )\\n public\\n virtual\\n returns (bytes32)\\n {\\n if (msg.sender != address(flashloan) || initiator != address(this)) revert NotTrusted();\\n address sender;\\n uint256 typeAction;\\n uint256 minAmountOut;\\n SwapType swapType;\\n bytes memory callData;\\n address tokenOut;\\n address tokenIn;\\n {\\n address yieldBearingAsset;\\n address asset;\\n (sender, typeAction, yieldBearingAsset, asset, minAmountOut, swapType, callData) =\\n abi.decode(data, (address, uint256, address, address, uint256, SwapType, bytes));\\n if (typeAction == 1) {\\n // Increase yield exposure action: we bring in the yield bearing asset\\n tokenOut = yieldBearingAsset;\\n tokenIn = asset;\\n } else {\\n // Decrease yield exposure action: we bring in the deposit asset\\n tokenIn = yieldBearingAsset;\\n tokenOut = asset;\\n }\\n }\\n uint256 tokenInBalanceBefore = IERC20(tokenIn).balanceOf(address(this));\\n\\n uint256 amountOut =\\n parallelizer.swapExactInput(amount, 0, address(tokenP), tokenIn, address(this), block.timestamp);\\n // The principal is spent, what the lender will pull back is the principal plus its fee\\n amount += fee;\\n\\n // Swap to tokenOut\\n amountOut = _swapToTokenOut(typeAction, tokenIn, tokenOut, amountOut, swapType, callData);\\n\\n _adjustAllowance(tokenOut, address(parallelizer), amountOut);\\n uint256 amountStableOut =\\n parallelizer.swapExactInput(amountOut, minAmountOut, tokenOut, address(tokenP), address(this), block.timestamp);\\n\\n amountStableOut += _recoverResidualInput(tokenIn, tokenInBalanceBefore);\\n\\n if (amount > amountStableOut) {\\n budget[sender] -= amount - amountStableOut; // Will revert if not enough funds\\n } else if (amountStableOut > amount) {\\n budget[sender] += amountStableOut - amount;\\n }\\n return CALLBACK_SUCCESS;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SETTERS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the token transfer contract\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress) public override restricted {\\n super.setTokenTransferAddress(newTokenTransferAddress);\\n }\\n\\n /**\\n * @notice Set the swap router\\n * @param newSwapRouter address of the swap router\\n */\\n function setSwapRouter(address newSwapRouter) public override restricted {\\n super.setSwapRouter(newSwapRouter);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNALS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Burns `amountStablecoins` for one yieldBearing asset, swap for asset then mints deposit tokens\\n /// from the proceeds of the swap.\\n /// @dev If `increase` is 1, then the system tries to increase its exposure to the yield bearing asset which means\\n /// burning tokenP for the deposit asset, swapping for the yield bearing asset, then minting the tokenP\\n /// @dev This function reverts if the second tokenP mint gives less than `minAmountOut` of ag tokens\\n /// @dev This function reverts if the swap slippage is higher than `maxSlippage`\\n function _adjustYieldExposure(\\n uint256 amountStablecoins,\\n uint8 increase,\\n address yieldBearingAsset,\\n address asset,\\n uint256 minAmountOut,\\n SwapType swapType,\\n bytes memory extraData\\n )\\n internal\\n {\\n flashloan.flashLoan(\\n IERC3156FlashBorrower(address(this)),\\n address(tokenP),\\n amountStablecoins,\\n abi.encode(msg.sender, increase, yieldBearingAsset, asset, minAmountOut, swapType, extraData)\\n );\\n }\\n\\n /**\\n * @dev Returns any input the route did not consume to the Parallelizer\\n * @param tokenIn address of the token offered to the route\\n * @param balanceBefore balance of `tokenIn` held before the operation\\n * @return the tokenP obtained from the remainder, zero when the route consumed everything\\n *\\n * Router calldata is built off chain while the input is sized on chain, so a route can consume\\n * less than was offered. Returning the remainder keeps it inside the Parallelizer's accounting\\n * instead of stranding it here, and it settles with the rest of the operation.\\n */\\n function _recoverResidualInput(address tokenIn, uint256 balanceBefore) internal returns (uint256) {\\n uint256 balanceAfter = IERC20(tokenIn).balanceOf(address(this));\\n if (balanceAfter <= balanceBefore) return 0;\\n uint256 residual = balanceAfter - balanceBefore;\\n _adjustAllowance(tokenIn, address(parallelizer), residual);\\n return parallelizer.swapExactInput(residual, 0, tokenIn, address(tokenP), address(this), block.timestamp);\\n }\\n\\n function _swapToTokenOut(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n SwapType swapType,\\n bytes memory callData\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (swapType == SwapType.SWAP) {\\n amountOut = _swapToTokenOutSwap(tokenIn, tokenOut, amount, callData);\\n } else if (swapType == SwapType.VAULT) {\\n amountOut = _swapToTokenOutVault(typeAction, tokenIn, tokenOut, amount);\\n }\\n }\\n\\n /**\\n * @notice Swap token using the router/aggregator\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n * @param callData bytes to call the router/aggregator\\n */\\n function _swapToTokenOutSwap(\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n bytes memory callData\\n )\\n internal\\n returns (uint256)\\n {\\n uint256 balance = IERC20(tokenOut).balanceOf(address(this));\\n\\n address[] memory tokens = new address[](1);\\n tokens[0] = tokenIn;\\n bytes[] memory callDatas = new bytes[](1);\\n callDatas[0] = callData;\\n uint256[] memory amounts = new uint256[](1);\\n amounts[0] = amount;\\n _swap(tokens, callDatas, amounts);\\n // A route that consumed less than offered would otherwise leave the difference approved\\n IERC20(tokenIn).forceApprove(tokenTransferAddress, 0);\\n\\n return IERC20(tokenOut).balanceOf(address(this)) - balance;\\n }\\n\\n /**\\n * @dev Deposit or redeem the vault asset\\n * @param typeAction 1 for deposit, 2 for redeem\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n */\\n function _swapToTokenOutVault(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (typeAction == 1) {\\n // Granting allowance with the yieldBearingAsset for the vault asset\\n _adjustAllowance(tokenIn, tokenOut, amount);\\n amountOut = IERC4626(tokenOut).deposit(amount, address(this));\\n } else {\\n amountOut = IERC4626(tokenIn).redeem(amount, address(this), address(this));\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe10b65b2a75ead0d938a2282cf478e94ea425adb38a03ca077fa0422ec2d322c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IDiamondCut\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondCut.sol by mudgen\\n/// @dev This interface is an authorized fork of Angle's `IDiamondCut` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IDiamondCut.sol\\ninterface IDiamondCut {\\n /// @notice Add/replace/remove any number of functions and optionally execute a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments, executed with delegatecall on\\n /// _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x08a01f77b740f7da424f0ea27a6a292f9e292058e23d1fe960d2d19a44496c7b\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondEtherscan.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IDiamondEtherscan\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface IDiamondEtherscan {\\n /// @notice Sets a dummy implementation with the same layout at the diamond proxy contract with all its facets\\n function setDummyImplementation(address _implementation) external;\\n\\n /// @notice Address of the dummy implementation used to make the DiamondProxy contract interpretable by Etherscan\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xf742b55592d129e02fb755d25f7a97ed976a14c4c744d6ac46726809e8f1e037\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @notice IDiamondLoupe\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondLoupe.sol by mudgen\\ninterface IDiamondLoupe {\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xa5580958acabe2c44967e835e77a748eb0b8812f70cd071191201508c9388ca8\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IDiamondCut } from \\\"./IDiamondCut.sol\\\";\\nimport { IDiamondEtherscan } from \\\"./IDiamondEtherscan.sol\\\";\\nimport { IDiamondLoupe } from \\\"./IDiamondLoupe.sol\\\";\\nimport { IGetters } from \\\"./IGetters.sol\\\";\\nimport { IRedeemer } from \\\"./IRedeemer.sol\\\";\\nimport { IRewardHandler } from \\\"./IRewardHandler.sol\\\";\\nimport { ISettersGovernor, ISettersGuardian } from \\\"./ISetters.sol\\\";\\nimport { ISwapper } from \\\"./ISwapper.sol\\\";\\nimport { ISurplus } from \\\"./ISurplus.sol\\\";\\n\\n/// @title IParallelizer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuter` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuter.sol\\ninterface IParallelizer is\\n IDiamondCut,\\n IDiamondEtherscan,\\n IDiamondLoupe,\\n IGetters,\\n IRedeemer,\\n IRewardHandler,\\n ISettersGovernor,\\n ISettersGuardian,\\n ISwapper,\\n ISurplus\\n{ }\\n\",\"keccak256\":\"0x3d43efebf663185429a411300477c3a62bf5e025fb286cf812cd0b589fb8bd5a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IHarvester` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IHarvester.sol\\ninterface IRebalancer {\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address stablecoin,\\n uint64 targetExposure,\\n uint64 minExposureYieldAsset,\\n uint64 maxExposureYieldAsset,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external;\\n\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) external;\\n\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external;\\n\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) external;\\n}\\n\",\"keccak256\":\"0x0a30a492e29ebe67db0f4cac7bfb142d04556a61282e71733d13c11daeba08b1\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISurplus.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISurplus {\\n /// @dev This function will swap the surplus of a collateral for the stable asset link to the protocol.\\n /// @param collateral The collateral address to process the surplus of.\\n /// @param maxCollateralAmount The maximum amount of collateral to process. If 0, processes the full surplus.\\n /// @return collateralSurplus The surplus of the collateral actually processed.\\n /// @return stableSurplus The surplus amount in stable calculated from the collateral surplus.\\n /// @return issuedAmount The amount of newly issued stablecoins from the collateral swapped\\n function processSurplus(\\n address collateral,\\n uint256 maxCollateralAmount\\n )\\n external\\n returns (uint256 collateralSurplus, uint256 stableSurplus, uint256 issuedAmount);\\n\\n /// @notice Releases the income to the payees\\n /// @return payees The addresses of the payees\\n /// @return amounts The amounts released to the payees\\n function release() external returns (address[] memory payees, uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x0129ea80a666d553ddd13c02f56a72cc96a6ac4e45578f0f523def2732ce450f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISwapper\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISwapper` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISwapper.sol\\ninterface ISwapper {\\n /// @notice Swaps (that is to say mints or burns) an exact amount of `tokenIn` for an amount of `tokenOut`\\n /// @param amountIn Amount of `tokenIn` to bring\\n /// @param amountOutMin Minimum amount of `tokenOut` to get: if `amountOut` is inferior to this amount, the\\n /// function will revert\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountOut Amount of `tokenOut` obtained through the swap\\n function swapExactInput(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactInput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactInputWithPermit(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Swaps (that is to say mints or burns) an amount of `tokenIn` for an exact amount of `tokenOut`\\n /// @param amountOut Amount of `tokenOut` to obtain from the swap\\n /// @param amountInMax Maximum amount of `tokenIn` to bring in order to get `amountOut` of `tokenOut`\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountIn Amount of `tokenIn` used to perform the swap\\n function swapExactOutput(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactOutput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactOutputWithPermit(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactInput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeSwapExactInputNonce(...)`,\\n /// which binds the full swap intent. `authData.nonce` carries the caller-chosen `userSalt`; the\\n /// facet recomputes the derived nonce from the call arguments before forwarding it to the\\n /// token, so any tampering with `to`/slippage/deadline invalidates the signature.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactInputWithAuthorization(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactOutput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The authorization must be signed for `amountInMax`; the excess is refunded to the\\n /// authorizer. Derived-nonce scheme as in `swapExactInputWithAuthorization`, using\\n /// `LibAuthorization.computeSwapExactOutputNonce(...)`.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactOutputWithAuthorization(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Simulates what a call to `swapExactInput` with `amountIn` of `tokenIn` for `tokenOut` would give.\\n /// If called right before and at the same block, the `amountOut` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactInput`\\n function quoteIn(uint256 amountIn, address tokenIn, address tokenOut) external view returns (uint256 amountOut);\\n\\n /// @notice Simulates what a call to `swapExactOutput` for `amountOut` of `tokenOut` with `tokenIn` would give.\\n /// If called right before and at the same block, the `amountIn` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactOutput`\\n function quoteOut(uint256 amountOut, address tokenIn, address tokenOut) external view returns (uint256 amountIn);\\n}\\n\",\"keccak256\":\"0xbf7e08cff6dd51c222f86976d3526307098b80100c81978a55566043924cfc06\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/// @notice ERC4626 interface\\n/// @author OpenZeppelin\\n/// @dev In this implementation, the interface only contains the functions that the IERC4626 interface adds on top of\\n/// the IERC20 interface\\ninterface IERC4626 {\\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\":\"0xd730d6a6b679201eec89dff3133de651da20b3e72e74f01b734078bfacf952ad\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/AccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { IAccessManaged } from \\\"@openzeppelin/contracts/access/manager/IAccessManaged.sol\\\";\\nimport { Context } from \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\n/// @title AccessControl\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Fork of OpenZeppelin's `AccessManaged` contract\\n/// updated to make _checkCanCall to return bool\\n/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/manager/AccessManaged.sol\\ncontract AccessManaged is Context, IAccessManaged {\\n address private _authority;\\n\\n bool private _consumingSchedule;\\n\\n /**\\n * @dev Initializes the contract connected to an initial authority.\\n */\\n constructor(address initialAuthority) {\\n _setAuthority(initialAuthority);\\n }\\n\\n /**\\n * @dev Restricts access to a function as defined by the connected Authority for this contract and the\\n * caller and selector of the function that entered the contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * In general, this modifier should only be used on `external` functions. It is okay to use it on `public`\\n * functions that are used as external entry points and are not called internally. Unless you know what you're\\n * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security\\n * implications! This is because the permissions are determined by the function that entered the contract, i.e. the\\n * function at the bottom of the call stack, and not the function where the modifier is visible in the source code.\\n * ====\\n *\\n * [WARNING]\\n * ====\\n * Avoid adding this modifier to the\\n * https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]\\n * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These\\n * functions are the only execution paths where a function selector cannot be unambiguously determined from the\\n * calldata\\n * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()`\\n * function\\n * if no calldata is provided. (See {_checkCanCall}).\\n *\\n * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.\\n * ====\\n */\\n modifier restricted() {\\n address caller = _msgSender();\\n require(_checkCanCall(caller, _msgData()), AccessManagedUnauthorized(caller));\\n _;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function authority() public view virtual returns (address) {\\n return _authority;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function setAuthority(address newAuthority) public virtual {\\n address caller = _msgSender();\\n if (caller != authority()) {\\n revert AccessManagedUnauthorized(caller);\\n }\\n if (newAuthority.code.length == 0) {\\n revert AccessManagedInvalidAuthority(newAuthority);\\n }\\n _setAuthority(newAuthority);\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function isConsumingScheduledOp() public view returns (bytes4) {\\n return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /**\\n * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the\\n * permissions set by the current authority.\\n */\\n function _setAuthority(address newAuthority) internal virtual {\\n _authority = newAuthority;\\n emit AuthorityUpdated(newAuthority);\\n }\\n\\n function _checkCanCall(address caller, bytes calldata data) internal virtual returns (bool) {\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(authority(), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n _consumingSchedule = true;\\n IAccessManager(authority()).consumeScheduledOp(caller, data);\\n _consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x40dfee0e736695b3005df6c150a2d794ac06f3f4b91745e2959623e770044798\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"},\"project/libs/helpers/RouterSwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/// @title Swapper\\n/// @author Angle Labs, Inc.\\n/// @dev Abstract contract for swapping tokens using a router/aggregator\\n/// @dev This contract is an authorized fork of Angle's `RouterSwapper` contract\\n/// https://github.com/AngleProtocol/utils/blob/main/src/RouterSwapper.sol\\nabstract contract RouterSwapper {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERRORS\\n //////////////////////////////////////////////////////////////*/\\n\\n error SwapError();\\n error ZeroAddress();\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Event emitted when the swap router is updated\\n */\\n event SwapRouterUpdated(address newSwapRouter);\\n /**\\n * @notice Event emitted when the token proxy is updated\\n */\\n event TokenTransferAddressUpdated(address newTokenTransferAddress);\\n\\n /*//////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////*/\\n\\n modifier noZeroAddress(address targetAddress) {\\n if (targetAddress == address(0)) {\\n revert ZeroAddress();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n MUTABLE VARIABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice address of the router/aggregator\\n */\\n address public swapRouter;\\n /**\\n * @notice address to approve to transfer tokens to\\n */\\n address public tokenTransferAddress;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(address initialSwapRouter, address initialTokenTransferAddress) {\\n swapRouter = initialSwapRouter;\\n tokenTransferAddress = initialTokenTransferAddress;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the router/aggregator address\\n * @param newSwapRouter address of the new router/aggregator\\n */\\n function setSwapRouter(address newSwapRouter) public virtual noZeroAddress(newSwapRouter) {\\n swapRouter = newSwapRouter;\\n\\n emit SwapRouterUpdated(newSwapRouter);\\n }\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the new token transfer address\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress)\\n public\\n virtual\\n noZeroAddress(newTokenTransferAddress)\\n {\\n tokenTransferAddress = newTokenTransferAddress;\\n\\n emit TokenTransferAddressUpdated(newTokenTransferAddress);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n SWAP FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Approve the router/aggregator to spend the token if needed\\n * @param token address of the token to approve\\n * @param spender address of the router/aggregator\\n * @param amount amount to approve\\n */\\n function _approveTokenIfNeeded(address token, address spender, uint256 amount) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), spender);\\n if (allowance < amount) {\\n IERC20(token).safeIncreaseAllowance(spender, amount - allowance);\\n }\\n }\\n\\n /**\\n * @notice Perform the swap using the router/aggregator\\n * @param callData bytes to call the router/aggregator\\n */\\n function _performRouterSwap(bytes memory callData) internal {\\n (bool success, bytes memory retData) = swapRouter.call(callData);\\n\\n if (!success) {\\n if (retData.length != 0) {\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, retData), mload(retData))\\n }\\n }\\n revert SwapError();\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swapCalldata(address[] calldata tokens, bytes[] calldata callDatas, uint256[] calldata amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swap(address[] memory tokens, bytes[] memory callDatas, uint256[] memory amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8c5a6b026a95816806814ef681b6b225ea4c405a39a4eab0111921853202829c\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "storageLayout": { + "storage": [ + { + "astId": 29857, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_authority", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 29859, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_consumingSchedule", + "offset": 20, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 10262, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "yieldBearingData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)" + }, + { + "astId": 10267, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "isTrusted", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 30616, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "swapRouter", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 30619, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "tokenTransferAddress", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 11058, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "budget", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct YieldBearingParams)", + "numberOfBytes": "32", + "value": "t_struct(YieldBearingParams)10202_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(YieldBearingParams)10202_storage": { + "encoding": "inplace", + "label": "struct YieldBearingParams", + "members": [ + { + "astId": 10191, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "asset", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 10193, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "targetExposure", + "offset": 20, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 10195, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxExposure", + "offset": 0, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10197, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "minExposure", + "offset": 8, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10199, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "overrideExposures", + "offset": 16, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10201, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxSlippage", + "offset": 24, + "slot": "1", + "type": "t_uint64" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + }, + "userdoc": { + "events": { + "SwapRouterUpdated(address)": { + "notice": "Event emitted when the swap router is updated" + }, + "TokenTransferAddressUpdated(address)": { + "notice": "Event emitted when the token proxy is updated" + } + }, + "kind": "user", + "methods": { + "addBudget(uint256,address)": { + "notice": "Add budget to be spent by the receiver during the flashloan" + }, + "budget(address)": { + "notice": "Budget of tokenP available for each users" + }, + "computeRebalanceAmount(address)": { + "notice": "Compute the amount needed to rebalance the Parallelizer" + }, + "flashloan()": { + "notice": "Parallel stablecoin flashloan contract" + }, + "harvest(address,uint256,bytes)": { + "notice": "Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset" + }, + "isTrusted(address)": { + "notice": "trusted addresses that can update target exposure and do others non critical operations" + }, + "parallelizer()": { + "notice": "Reference to the `parallelizer` implementation this contract aims at rebalancing" + }, + "recoverERC20(address,uint256,address)": { + "notice": "Recover ERC20 tokens" + }, + "removeBudget(uint256,address)": { + "notice": "Remove budget from the owner and send it to the receiver" + }, + "resetAllowance(address,address)": { + "notice": "Set an allowance this contract granted back to zero" + }, + "setMaxSlippage(address,uint64)": { + "notice": "Set the max allowed slippage" + }, + "setSwapRouter(address)": { + "notice": "Set the swap router" + }, + "setTargetExposure(address,uint64)": { + "notice": "Set the target exposure of a yield bearing asset" + }, + "setTokenTransferAddress(address)": { + "notice": "Set the token transfer address" + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "notice": "Set the yieldBearingAsset data" + }, + "swapRouter()": { + "notice": "address of the router/aggregator" + }, + "toggleTrusted(address)": { + "notice": "Toggle the trusted status of an address" + }, + "tokenP()": { + "notice": "TokenP handled by the `parallelizer` of interest" + }, + "tokenTransferAddress()": { + "notice": "address to approve to transfer tokens to" + }, + "updateLimitExposuresYieldAsset(address)": { + "notice": "Set the limit exposures to the asset linked to the yield bearing asset" + }, + "yieldBearingData(address)": { + "notice": "Data associated to a yield bearing asset" + } + }, + "version": 1 + }, + "argsData": "0x00000000000000000000000019ceead7105607cd444f5ad10dd51356436095a100000000000000000000000019ceead7105607cd444f5ad10dd51356436095a100000000000000000000000076a9a0062ec6712b99b4f63bd2b4270185759dd5000000000000000000000000c3bef21ea7deb5c34cf33e918c8e28972c8048ed0000000000000000000000000f5543b12781242e192b4f85240280e168481b5a00000000000000000000000008417cdb7f52a5021bb4eb6e0deaf3f295c3f182", + "transaction": { + "hash": "0xea9b52019858bb2d90968a15d2a89388664f0f892ba0e29134a2e00d9ed16c8f", + "nonce": "0xcf", + "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" + }, + "receipt": { + "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "0x3232450", + "transactionIndex": "0x30" + } +} \ No newline at end of file diff --git a/deployments/base/Getters.json b/deployments/base/Getters.json index b346388..e8e7c45 100644 --- a/deployments/base/Getters.json +++ b/deployments/base/Getters.json @@ -1,5 +1,5 @@ { - "address": "0x2b822194bea84cbf5b52956eb3435e58d20abd1f", + "address": "0xa5b6c0c6afbfb5c8808ec3ad3db9098a6b82433a", "abi": [ { "inputs": [], @@ -549,6 +549,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getSwapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getTotalIssued", @@ -752,8 +765,8 @@ ], "contractName": "Getters", "sourceName": "contracts/parallelizer/facets/Getters.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061415b8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506141968061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -804,7 +817,7 @@ "getSlippageTolerance(address)": { "details": "Maximum slippage tolerance is 1e9 (100%)" }, - "getSurplusBufferRatio()": { + "getSwapRouter()": { "details": "Expressed in base 1e9, and always >= 1e9" }, "isConsumingScheduledOp()": { @@ -823,9 +836,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3346200", - "executionCost": "3721", - "totalCost": "3349921" + "codeDepositCost": "3358000", + "executionCost": "3737", + "totalCost": "3361737" }, "external": { "accessManager()": "2418", @@ -847,7 +860,8 @@ "getShares(address)": "2561", "getSlippageTolerance(address)": "2564", "getStablecoinCap(address)": "infinite", - "getSurplusBufferRatio()": "2356", + "getSurplusBufferRatio()": "2334", + "getSwapRouter()": "2420", "getTotalIssued()": "infinite", "getTotalShares()": "2369", "isConsumingScheduledOp()": "infinite", @@ -862,7 +876,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSurplusBufferRatio()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSurplusBufferRatio()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processing\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x04f12ddeb53bb3bba9aaf9a93c62a84076cca496642d4d87556b15120b60e07b\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0xd53f1dc85e3e3b30205017bf00b54c9b511963034d382ecc647e65ad854b314e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSwapRouter()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSwapRouter()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSwapRouter() external view returns (address) {\\n return s.transmuterStorage().swapRouter;\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0x7698420203383c245b91740b40652708e240877ec9d006d211556c7ffe0406e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -927,8 +941,8 @@ "getStablecoinCap(address)": { "notice": "Returns the stablecoin cap for `collateral`" }, - "getSurplusBufferRatio()": { - "notice": "Returns the minimum collateral ratio that must hold after surplus processing" + "getSwapRouter()": { + "notice": "Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to" }, "getTotalIssued()": { "notice": "Returns the total amount of stablecoins issued through Parallelizer" @@ -965,13 +979,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0xb143a60af6483f74ce57f394644cdaef5542302a6b975b151eb7696a3ea612f9", - "nonce": "0xb0", + "hash": "0xa73cf8bcdb6cfa1b5138eb6c73e260f5661fc58181f1942c6438603006db5584", + "nonce": "0xcc", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "blockNumber": "0x2eb0650", - "transactionIndex": "0x21" + "blockNumber": "0x31e6d75", + "transactionIndex": "0x6a" } } \ No newline at end of file diff --git a/deployments/base/Redeemer.json b/deployments/base/Redeemer.json index a6e12dc..12ac433 100644 --- a/deployments/base/Redeemer.json +++ b/deployments/base/Redeemer.json @@ -1,5 +1,5 @@ { - "address": "0xa2ebf74746eed7d586b3b9696511a553210d1b09", + "address": "0xd5ef1d8c08ed5b9fbe9b1ff806defd9ca985d8b9", "abi": [ { "inputs": [], @@ -78,6 +78,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "UnexpectedRedemptionTokens", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -179,6 +184,11 @@ "internalType": "uint256[]", "name": "minAmountOuts", "type": "uint256[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeem", @@ -224,6 +234,11 @@ "name": "forfeitTokens", "type": "address[]" }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" + }, { "internalType": "bytes", "name": "authData", @@ -272,6 +287,11 @@ "internalType": "address[]", "name": "forfeitTokens", "type": "address[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeemWithForfeit", @@ -317,8 +337,8 @@ ], "contractName": "Redeemer", "sourceName": "contracts/parallelizer/facets/Redeemer.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50613a5c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50613b148061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -347,10 +367,11 @@ "tokens": "List of tokens that would be given" } }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "details": "The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function", "params": { "deadline": "Timestamp before which the redemption should have occured", + "expectedTokensHash": "`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects", "minAmountOuts": "Minimum amount of each token given back in the redemption to obtain", "receiver": "Address which should be receiving the output tokens" }, @@ -359,10 +380,10 @@ "tokens": "List of tokens returned" } }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { - "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`." + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { + "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list" }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "details": "Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount" }, "updateNormalizer(uint256,bool)": { @@ -375,28 +396,28 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "2988000", - "executionCost": "3276", - "totalCost": "2991276" + "codeDepositCost": "3024800", + "executionCost": "3323", + "totalCost": "3028123" }, "external": { "quoteRedemptionCurve(uint256)": "infinite", - "redeem(uint256,address,uint256,uint256[])": "infinite", - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": "infinite", - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": "infinite", + "redeem(uint256,address,uint256,uint256[],bytes32)": "infinite", + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": "infinite", + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": "infinite", "updateNormalizer(uint256,bool)": "infinite" }, "internal": { - "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_distributeRedemption(struct Redeemer.RedemptionExecution memory)": "infinite", - "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_quoteRedemptionCurve(uint256)": "infinite", - "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_updateNormalizer(uint256,bool)": "infinite" } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[])\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[])\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the\\n /// signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x2ea4d5ebd3dd0e83071ebedb2c269f501f37033ddce9a1ee9ec40cfde0adfc7a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n _updateNormalizer(amount, false);\\n\\n redemption.from = _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(\\n redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config\\n );\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP)).receiveWithAuthorization(\\n params.from,\\n address(this),\\n params.value,\\n params.validAfter,\\n params.validBefore,\\n derivedNonce,\\n params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x52467df54a2a68910287c51c0ee42d304de44a7ccacd22fff8426911835356f3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe41991a0a564f4f6443aeffd6f1519ae3decc8a9e1e625f51ddf2168453ea4f2\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedRedemptionTokens\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"expectedTokensHash\":\"`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n // `minAmountOuts` is positional, so it only protects quantities. Binding the output list itself is what\\n // ties each minimum to the token it was quoted against, across a collateral rotation\\n if (keccak256(abi.encodePacked(redemption.tokens)) != expectedTokensHash) revert UnexpectedRedemptionTokens();\\n _updateNormalizer(amount, false);\\n\\n redemption.from =\\n _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config);\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP))\\n .receiveWithAuthorization(\\n params.from, address(this), params.value, params.validAfter, params.validBefore, derivedNonce, params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x1a67602de708b202cbfb4311b65c8e28294c043d059c53c66dcd9c7b1512d3c0\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 expectedTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d4;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the redemption output list the\\n /// authorizer was quoted, binding token identity and ordering rather than raw amounts alone\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n expectedTokensHash,\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x195b02224ec034756820857b7f88acc6ace194d00a68a9a6f0bcb8adf38963c8\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -407,13 +428,13 @@ "quoteRedemptionCurve(uint256)": { "notice": "Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block" }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "notice": "Redeems `amount` of stablecoins from the system" }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { "notice": "Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer." }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "notice": "Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`." }, "updateNormalizer(uint256,bool)": { @@ -424,13 +445,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0x683933b72b7f81a3fee33b7107d5d1a98a3ff82338354d4cc41508b886ad3de9", - "nonce": "0xb2", + "hash": "0x49ddf768d3297b81bf439d205686ed92faa5ba08e0f87b9fbaf5f998b7d985d5", + "nonce": "0xcd", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "blockNumber": "0x2eb0651", - "transactionIndex": "0x33" + "blockNumber": "0x31e6d76", + "transactionIndex": "0x3b" } } \ No newline at end of file diff --git a/deployments/base/RewardHandler.json b/deployments/base/RewardHandler.json index 033ee36..f92cb33 100644 --- a/deployments/base/RewardHandler.json +++ b/deployments/base/RewardHandler.json @@ -1,5 +1,5 @@ { - "address": "0x2c85d2e8ecfabc0710ce87ca2c5278ae26733a85", + "address": "0x6cd1948f6ae0b49f7778167ffa94d7d148c8a307", "abi": [ { "inputs": [], @@ -18,12 +18,12 @@ }, { "inputs": [], - "name": "OdosSwapFailed", + "name": "ReentrantCall", "type": "error" }, { "inputs": [], - "name": "ReentrantCall", + "name": "RewardSwapFailed", "type": "error" }, { @@ -42,6 +42,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -88,8 +93,8 @@ ], "contractName": "RewardHandler", "sourceName": "contracts/parallelizer/facets/RewardHandler.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50610fa08061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50610fd38061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -108,7 +113,7 @@ "kind": "dev", "methods": { "sellRewards(uint256,bytes)": { - "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped" + "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped" } }, "title": "RewardHandler", @@ -117,9 +122,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "800000", - "executionCost": "829", - "totalCost": "800829" + "codeDepositCost": "810200", + "executionCost": "842", + "totalCost": "811042" }, "external": { "sellRewards(uint256,bytes)": "infinite" @@ -129,7 +134,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OdosSwapFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a odos call\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to odos\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xff2afcbc8d1c25297324159d3684a323e60b3c9408129aba70d3d6938d093255\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to Odos router for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = ODOS_ROUTER.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes odos revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert OdosSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xf01917011b3966f1783fa024ce6c56b5294ef0f65531bdc3f2e068649cd45038\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardSwapFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to the configured `swapRouter` for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n address swapRouter = ts.swapRouter;\\n if (swapRouter == address(0)) revert ZeroAddress();\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = swapRouter.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes the router's revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert RewardSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xa4e2fdeaaa43d78dfe1a81f458108856ebc92f27a7194e6293ac3c5084325beb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -145,13 +150,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0x83004e52a41495b5242d10c39e0dc39a9e609219ba291c840af830a4a8bee795", - "nonce": "0xb3", + "hash": "0x2838918510f6712c049c3196137284bc58b3ea44465364495cb8cbc69aced270", + "nonce": "0xce", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "blockNumber": "0x2eb0651", - "transactionIndex": "0x58" + "blockNumber": "0x31e6d76", + "transactionIndex": "0x63" } } \ No newline at end of file diff --git a/deployments/base/SettersGovernor.json b/deployments/base/SettersGovernor.json index 6d9354d..cb78032 100644 --- a/deployments/base/SettersGovernor.json +++ b/deployments/base/SettersGovernor.json @@ -1,5 +1,5 @@ { - "address": "0x153bf462a553c2e1d45d9f5cad4e70e9a362caee", + "address": "0x028c3e3a0984c441c5205cfd0c39a6cf244ee696", "abi": [ { "inputs": [], @@ -57,6 +57,11 @@ "name": "InvalidParams", "type": "error" }, + { + "inputs": [], + "name": "InvalidPayee", + "type": "error" + }, { "inputs": [], "name": "InvalidRate", @@ -135,6 +140,11 @@ "name": "SafeERC20FailedOperation", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "inputs": [], "name": "ZeroAmount", @@ -285,6 +295,31 @@ "name": "OracleSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousTarget", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTarget", + "type": "uint256" + } + ], + "name": "OracleTargetUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -405,6 +440,19 @@ "name": "SurplusBufferRatioUpdated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -601,6 +649,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -712,8 +773,8 @@ ], "contractName": "SettersGovernor", "sourceName": "contracts/parallelizer/facets/SettersGovernor.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061417d8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506143348061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -759,6 +820,9 @@ "setCollateralManager(address,bool,(address[],bytes))": { "details": "Funds need to have been withdrawn from the eventual previous manager prior to this call" }, + "setSwapRouter(address)": { + "details": "The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold" + }, "updatePayees(address[],uint256[],bool)": { "params": { "_payees": "The new payee addresses", @@ -782,9 +846,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3353000", - "executionCost": "3729", - "totalCost": "3356729" + "codeDepositCost": "3440800", + "executionCost": "3842", + "totalCost": "3444642" }, "external": { "addCollateral(address)": "infinite", @@ -795,6 +859,7 @@ "setAccessManager(address)": "infinite", "setCollateralManager(address,bool,(address[],bytes))": "infinite", "setOracle(address,bytes)": "infinite", + "setSwapRouter(address)": "infinite", "setWhitelistStatus(address,uint8,bytes)": "infinite", "toggleTrusted(address,uint8)": "infinite", "updateOracle(address)": "infinite", @@ -804,12 +869,17 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xd4d195b62841c28dd5f248d09e682c3c81bda24b471cd8a5d8efe498519ea50d\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n}\\n\",\"keccak256\":\"0x3d0d0351ef8f06a401c421d2f76b4227e4819935583ad29f44fc6dc59f5ea021\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x9e41915e7fb03ef3b054f7ce0b7ab297e3b8f5c05ab1e7ebe072e22f11b22362\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousTarget\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTarget\",\"type\":\"uint256\"}],\"name\":\"OracleTargetUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"setSwapRouter(address)\":{\"details\":\"The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"events\":{\"OracleTargetUpdated(address,uint256,uint256)\":{\"notice\":\"Emitted when a MAX target price is ratcheted up by `updateOracle`\"}},\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setSwapRouter(address)\":{\"notice\":\"Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setSwapRouter(address swapRouter) external restricted {\\n LibSetters.setSwapRouter(swapRouter);\\n }\\n}\\n\",\"keccak256\":\"0x7c64a27bfb326989b6fdc21b3982ef5ce95aa2a576a4edc6d8334a8820f3b8fb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n event SwapRouterUpdated(address indexed swapRouter);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `setSwapRouter`\\n function setSwapRouter(address swapRouter) internal {\\n if (swapRouter == address(0)) revert ZeroAddress();\\n s.transmuterStorage().swapRouter = swapRouter;\\n emit SwapRouterUpdated(swapRouter);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n // The Parallelizer holds the income being distributed, so a share allocated to itself is handed\\n // back to `release` as fresh income on the next call. `address(0)` stays valid: `LibSurplus`\\n // treats it as the sentinel for burning that share.\\n if (_payee == address(this)) revert InvalidPayee();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x45ed1863aec8d20f3659d2b0ea657b629b5c33b71f895ae6775ea72156203197\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null }, "userdoc": { + "events": { + "OracleTargetUpdated(address,uint256,uint256)": { + "notice": "Emitted when a MAX target price is ratcheted up by `updateOracle`" + } + }, "kind": "user", "methods": { "addCollateral(address)": { @@ -836,6 +906,9 @@ "setOracle(address,bytes)": { "notice": "Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations" }, + "setSwapRouter(address)": { + "notice": "Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to" + }, "setWhitelistStatus(address,uint8,bytes)": { "notice": "Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist" }, @@ -859,13 +932,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0x7cbf40a2699c865662fca63ab183b71e210d058e99bea42c30a22b80480ab61d", - "nonce": "0xae", + "hash": "0x08ee937fa353757103f8671ba2e41d2589e2cef9912dd537a2712d8620ba9bc0", + "nonce": "0xcb", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "blockNumber": "0x2eb064e", - "transactionIndex": "0x1d" + "blockNumber": "0x31e6d75", + "transactionIndex": "0x48" } } \ No newline at end of file diff --git a/deployments/hyperevm/GenericRebalancer_USDp.json b/deployments/hyperevm/GenericRebalancer_USDp.json new file mode 100644 index 0000000..d262330 --- /dev/null +++ b/deployments/hyperevm/GenericRebalancer_USDp.json @@ -0,0 +1,1228 @@ +{ + "address": "0xb3d2115cb61b05f548df21f3c701194a86ee669b", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialTokenTransferAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "initialSwapRouter", + "type": "address" + }, + { + "internalType": "contract ITokenP", + "name": "definitivetokenP", + "type": "address" + }, + { + "internalType": "contract IParallelizer", + "name": "definitiveParallelizer", + "type": "address" + }, + { + "internalType": "address", + "name": "initialAuthority", + "type": "address" + }, + { + "internalType": "contract IERC3156FlashLender", + "name": "definitiveFlashloan", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AccessManagedInvalidAuthority", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "name": "AccessManagedRequiredDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessManagedUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParam", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrusted", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrustedOrGuardian", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SwapError", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "AllowanceReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "TokenTransferAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "trusted", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "TrustedToggled", + "type": "event" + }, + { + "inputs": [], + "name": "CALLBACK_SUCCESS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "addBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "budget", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "computeRebalanceAmount", + "outputs": [ + { + "internalType": "uint8", + "name": "increase", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "flashloan", + "outputs": [ + { + "internalType": "contract IERC3156FlashLender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "scale", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "harvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isTrusted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onFlashLoan", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "parallelizer", + "outputs": [ + { + "internalType": "contract IParallelizer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToRecover", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "removeBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "resetAllowance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "newMaxSlippage", + "type": "uint64" + } + ], + "name": "setMaxSlippage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + } + ], + "name": "setTargetExposure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "setTokenTransferAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "name": "setYieldBearingAssetData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "swapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trusted", + "type": "address" + } + ], + "name": "toggleTrusted", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokenP", + "outputs": [ + { + "internalType": "contract ITokenP", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenTransferAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "updateLimitExposuresYieldAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "yieldBearingData", + "outputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contractName": "GenericRebalancer", + "sourceName": "contracts/helpers/GenericRebalancer.sol", + "bytecode": "0x60e060405234801561000f575f5ffd5b5060405161327238038061327283398101604081905261002e9161018c565b84868386868261003d81610122565b506001600160a01b0391821660a0528116608052600380549482166001600160a01b03199586161790556004805493821693909416929092179092558216905061009a5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0381811660c081905260a05160405163095ea7b360e01b815260048101929092525f1960248301529091169063095ea7b3906044016020604051808303815f875af11580156100f2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610116919061020f565b50505050505050610235565b5f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6001600160a01b0381168114610189575f5ffd5b50565b5f5f5f5f5f5f60c087890312156101a1575f5ffd5b86516101ac81610175565b60208801519096506101bd81610175565b60408801519095506101ce81610175565b60608801519094506101df81610175565b60808801519093506101f081610175565b60a088015190925061020181610175565b809150509295509295509295565b5f6020828403121561021f575f5ffd5b8151801515811461022e575f5ffd5b9392505050565b60805160a05160c051612f956102dd5f395f818161021a015281816106110152611f5a01525f81816101d6015281816105d9015281816107390152818161085901528181610e83015281816117710152611f8a01525f818161027501528181610779015281816108070152818161088f0152818161107901528181611720015281816117a5015281816118cc0152818161195d01528181611bd90152611cfb0152612f955ff3fe608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": { + "10252": [ + { + "length": 32, + "start": 629 + }, + { + "length": 32, + "start": 1913 + }, + { + "length": 32, + "start": 2055 + }, + { + "length": 32, + "start": 2191 + }, + { + "length": 32, + "start": 4217 + }, + { + "length": 32, + "start": 5920 + }, + { + "length": 32, + "start": 6053 + }, + { + "length": 32, + "start": 6348 + }, + { + "length": 32, + "start": 6493 + }, + { + "length": 32, + "start": 7129 + }, + { + "length": 32, + "start": 7419 + } + ], + "10256": [ + { + "length": 32, + "start": 470 + }, + { + "length": 32, + "start": 1497 + }, + { + "length": 32, + "start": 1849 + }, + { + "length": 32, + "start": 2137 + }, + { + "length": 32, + "start": 3715 + }, + { + "length": 32, + "start": 6001 + }, + { + "length": 32, + "start": 8074 + } + ], + "11053": [ + { + "length": 32, + "start": 538 + }, + { + "length": 32, + "start": 1553 + }, + { + "length": 32, + "start": 8026 + } + ] + }, + "inputSourceName": "project/contracts/helpers/GenericRebalancer.sol", + "devdoc": { + "author": "Cooper Labs", + "custom:contact": "security@cooperlabs.xyz", + "details": "Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol", + "errors": { + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC-20 token failed." + } + ] + }, + "events": { + "AuthorityUpdated(address)": { + "details": "Authority that manages this contract was updated." + } + }, + "kind": "dev", + "methods": { + "addBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to add to the budget", + "receiver": "address of the receiver" + } + }, + "authority()": { + "details": "Returns the current authority." + }, + "computeRebalanceAmount(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + }, + "returns": { + "amount": "amount to be rebalanced", + "increase": "whether the exposure should be increased" + } + }, + "harvest(address,uint256,bytes)": { + "details": "This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers" + }, + "isConsumingScheduledOp()": { + "details": "Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls." + }, + "onFlashLoan(address,address,uint256,uint256,bytes)": { + "details": "A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back", + "params": { + "amount": "The amount of tokens lent.", + "data": "Arbitrary data structure, intended to contain user-defined parameters.", + "fee": "The additional amount of tokens to repay.", + "initiator": "The initiator of the loan.", + "token": "The loan currency." + }, + "returns": { + "_0": "The keccak256 hash of \"ERC3156FlashBorrower.onFlashLoan\"" + } + }, + "recoverERC20(address,uint256,address)": { + "params": { + "amountToRecover": "amount to recover", + "to": "address to send the recovered tokens", + "tokenAddress": "address of the token to recover" + } + }, + "removeBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to remove from the budget", + "receiver": "address of the receiver" + } + }, + "resetAllowance(address,address)": { + "details": "Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.", + "params": { + "spender": "address losing the allowance", + "token": "address of the token" + } + }, + "setAuthority(address)": { + "details": "Transfers control to a new authority. The caller must be the current authority." + }, + "setMaxSlippage(address,uint64)": { + "params": { + "newMaxSlippage": "new max allowed slippage" + } + }, + "setSwapRouter(address)": { + "params": { + "newSwapRouter": "address of the swap router" + } + }, + "setTargetExposure(address,uint64)": { + "params": { + "targetExposure": "target exposure to the yield bearing asset used", + "yieldBearingAsset": "address of the yield bearing asset" + } + }, + "setTokenTransferAddress(address)": { + "params": { + "newTokenTransferAddress": "address of the token transfer contract" + } + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "params": { + "asset": "address of the asset", + "maxExposure": "maximum exposure within the Parallelizer to the asset", + "minExposure": "minimum exposure within the Parallelizer to the asset", + "overrideExposures": "whether limit exposures should be overriden or read onchain through the Parallelizer", + "targetExposure": "target exposure to the yieldBearingAsset asset used", + "yieldBearingAsset": "address of the yieldBearingAsset" + } + }, + "toggleTrusted(address)": { + "params": { + "trusted": "address to toggle the trusted status" + } + }, + "updateLimitExposuresYieldAsset(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + } + } + }, + "title": "GenericRebalancer", + "version": 1 + }, + "evm": { + "gasEstimates": { + "creation": { + "codeDepositCost": "2436200", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "CALLBACK_SUCCESS()": "240", + "addBudget(uint256,address)": "infinite", + "authority()": "2407", + "budget(address)": "2554", + "computeRebalanceAmount(address)": "infinite", + "flashloan()": "infinite", + "harvest(address,uint256,bytes)": "infinite", + "isConsumingScheduledOp()": "2442", + "isTrusted(address)": "2612", + "onFlashLoan(address,address,uint256,uint256,bytes)": "infinite", + "parallelizer()": "infinite", + "recoverERC20(address,uint256,address)": "infinite", + "removeBudget(uint256,address)": "infinite", + "resetAllowance(address,address)": "infinite", + "setAuthority(address)": "30486", + "setMaxSlippage(address,uint64)": "infinite", + "setSwapRouter(address)": "infinite", + "setTargetExposure(address,uint64)": "infinite", + "setTokenTransferAddress(address)": "infinite", + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": "infinite", + "swapRouter()": "2392", + "toggleTrusted(address)": "infinite", + "tokenP()": "infinite", + "tokenTransferAddress()": "2415", + "updateLimitExposuresYieldAsset(address)": "infinite", + "yieldBearingData(address)": "5001" + }, + "internal": { + "_adjustYieldExposure(uint256,uint8,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_recoverResidualInput(address,uint256)": "infinite", + "_swapToTokenOut(uint256,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_swapToTokenOutSwap(address,address,uint256,bytes memory)": "infinite", + "_swapToTokenOutVault(uint256,address,address,uint256)": "infinite" + } + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialTokenTransferAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialSwapRouter\",\"type\":\"address\"},{\"internalType\":\"contract ITokenP\",\"name\":\"definitivetokenP\",\"type\":\"address\"},{\"internalType\":\"contract IParallelizer\",\"name\":\"definitiveParallelizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialAuthority\",\"type\":\"address\"},{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"definitiveFlashloan\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AccessManagedInvalidAuthority\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"delay\",\"type\":\"uint32\"}],\"name\":\"AccessManagedRequiredDelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrustedOrGuardian\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SwapError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"AllowanceReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"TokenTransferAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CALLBACK_SUCCESS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"addBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"budget\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"computeRebalanceAmount\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"increase\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flashloan\",\"outputs\":[{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"harvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onFlashLoan\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parallelizer\",\"outputs\":[{\"internalType\":\"contract IParallelizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountToRecover\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"removeBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"resetAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"newMaxSlippage\",\"type\":\"uint64\"}],\"name\":\"setMaxSlippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"}],\"name\":\"setTargetExposure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"setTokenTransferAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"name\":\"setYieldBearingAssetData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenTransferAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"updateLimitExposuresYieldAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"yieldBearingData\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"AuthorityUpdated(address)\":{\"details\":\"Authority that manages this contract was updated.\"}},\"kind\":\"dev\",\"methods\":{\"addBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to add to the budget\",\"receiver\":\"address of the receiver\"}},\"authority()\":{\"details\":\"Returns the current authority.\"},\"computeRebalanceAmount(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"},\"returns\":{\"amount\":\"amount to be rebalanced\",\"increase\":\"whether the exposure should be increased\"}},\"harvest(address,uint256,bytes)\":{\"details\":\"This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"onFlashLoan(address,address,uint256,uint256,bytes)\":{\"details\":\"A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back\",\"params\":{\"amount\":\"The amount of tokens lent.\",\"data\":\"Arbitrary data structure, intended to contain user-defined parameters.\",\"fee\":\"The additional amount of tokens to repay.\",\"initiator\":\"The initiator of the loan.\",\"token\":\"The loan currency.\"},\"returns\":{\"_0\":\"The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\"}},\"recoverERC20(address,uint256,address)\":{\"params\":{\"amountToRecover\":\"amount to recover\",\"to\":\"address to send the recovered tokens\",\"tokenAddress\":\"address of the token to recover\"}},\"removeBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to remove from the budget\",\"receiver\":\"address of the receiver\"}},\"resetAllowance(address,address)\":{\"details\":\"Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.\",\"params\":{\"spender\":\"address losing the allowance\",\"token\":\"address of the token\"}},\"setAuthority(address)\":{\"details\":\"Transfers control to a new authority. The caller must be the current authority.\"},\"setMaxSlippage(address,uint64)\":{\"params\":{\"newMaxSlippage\":\"new max allowed slippage\"}},\"setSwapRouter(address)\":{\"params\":{\"newSwapRouter\":\"address of the swap router\"}},\"setTargetExposure(address,uint64)\":{\"params\":{\"targetExposure\":\"target exposure to the yield bearing asset used\",\"yieldBearingAsset\":\"address of the yield bearing asset\"}},\"setTokenTransferAddress(address)\":{\"params\":{\"newTokenTransferAddress\":\"address of the token transfer contract\"}},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"params\":{\"asset\":\"address of the asset\",\"maxExposure\":\"maximum exposure within the Parallelizer to the asset\",\"minExposure\":\"minimum exposure within the Parallelizer to the asset\",\"overrideExposures\":\"whether limit exposures should be overriden or read onchain through the Parallelizer\",\"targetExposure\":\"target exposure to the yieldBearingAsset asset used\",\"yieldBearingAsset\":\"address of the yieldBearingAsset\"}},\"toggleTrusted(address)\":{\"params\":{\"trusted\":\"address to toggle the trusted status\"}},\"updateLimitExposuresYieldAsset(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"}}},\"title\":\"GenericRebalancer\",\"version\":1},\"userdoc\":{\"events\":{\"SwapRouterUpdated(address)\":{\"notice\":\"Event emitted when the swap router is updated\"},\"TokenTransferAddressUpdated(address)\":{\"notice\":\"Event emitted when the token proxy is updated\"}},\"kind\":\"user\",\"methods\":{\"addBudget(uint256,address)\":{\"notice\":\"Add budget to be spent by the receiver during the flashloan\"},\"budget(address)\":{\"notice\":\"Budget of tokenP available for each users\"},\"computeRebalanceAmount(address)\":{\"notice\":\"Compute the amount needed to rebalance the Parallelizer\"},\"flashloan()\":{\"notice\":\"Parallel stablecoin flashloan contract\"},\"harvest(address,uint256,bytes)\":{\"notice\":\"Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset\"},\"isTrusted(address)\":{\"notice\":\"trusted addresses that can update target exposure and do others non critical operations\"},\"parallelizer()\":{\"notice\":\"Reference to the `parallelizer` implementation this contract aims at rebalancing\"},\"recoverERC20(address,uint256,address)\":{\"notice\":\"Recover ERC20 tokens\"},\"removeBudget(uint256,address)\":{\"notice\":\"Remove budget from the owner and send it to the receiver\"},\"resetAllowance(address,address)\":{\"notice\":\"Set an allowance this contract granted back to zero\"},\"setMaxSlippage(address,uint64)\":{\"notice\":\"Set the max allowed slippage\"},\"setSwapRouter(address)\":{\"notice\":\"Set the swap router\"},\"setTargetExposure(address,uint64)\":{\"notice\":\"Set the target exposure of a yield bearing asset\"},\"setTokenTransferAddress(address)\":{\"notice\":\"Set the token transfer address\"},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"notice\":\"Set the yieldBearingAsset data\"},\"swapRouter()\":{\"notice\":\"address of the router/aggregator\"},\"toggleTrusted(address)\":{\"notice\":\"Toggle the trusted status of an address\"},\"tokenP()\":{\"notice\":\"TokenP handled by the `parallelizer` of interest\"},\"tokenTransferAddress()\":{\"notice\":\"address to approve to transfer tokens to\"},\"updateLimitExposuresYieldAsset(address)\":{\"notice\":\"Set the limit exposures to the asset linked to the yield bearing asset\"},\"yieldBearingData(address)\":{\"notice\":\"Data associated to a yield bearing asset\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/helpers/GenericRebalancer.sol\":\"GenericRebalancer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManaged.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManaged {\\n /**\\n * @dev Authority that manages this contract was updated.\\n */\\n event AuthorityUpdated(address authority);\\n\\n error AccessManagedUnauthorized(address caller);\\n error AccessManagedRequiredDelay(address caller, uint32 delay);\\n error AccessManagedInvalidAuthority(address authority);\\n\\n /**\\n * @dev Returns the current authority.\\n */\\n function authority() external view returns (address);\\n\\n /**\\n * @dev Transfers control to a new authority. The caller must be the current authority.\\n */\\n function setAuthority(address) external;\\n\\n /**\\n * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n * attacker controlled calls.\\n */\\n function isConsumingScheduledOp() external view returns (bytes4);\\n}\\n\",\"keccak256\":\"0x1121e070554cffc6d536f658332a1a3d65fb2ea5573cd774f4ecbd02a2fcf4b7\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashBorrower.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashBorrower.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashBorrower, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashBorrower {\\n /**\\n * @dev Receive a flash loan.\\n * @param initiator The initiator of the loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param fee The additional amount of tokens to repay.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n * @return The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\\n */\\n function onFlashLoan(\\n address initiator,\\n address token,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n ) external returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e4b982b56b50290dd1dcaa2fef1178b1574dfc7c0f0a8ef9cb68a207d72582e\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashLender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashLender.sol)\\n\\npragma solidity >=0.5.0;\\n\\nimport {IERC3156FlashBorrower} from \\\"./IERC3156FlashBorrower.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashLender, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashLender {\\n /**\\n * @dev The amount of currency available to be lended.\\n * @param token The loan currency.\\n * @return The amount of `token` that can be borrowed.\\n */\\n function maxFlashLoan(address token) external view returns (uint256);\\n\\n /**\\n * @dev The fee to be charged for a given loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @return The amount of `token` to be charged for the loan, on top of the returned principal.\\n */\\n function flashFee(address token, uint256 amount) external view returns (uint256);\\n\\n /**\\n * @dev Initiate a flash loan.\\n * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n */\\n function flashLoan(\\n IERC3156FlashBorrower receiver,\\n address token,\\n uint256 amount,\\n bytes calldata data\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x218d708e7d8df417db24a497727eefb7772e61c7cde3886fc42bbcb6aafa6947\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/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\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/helpers/BaseRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { AccessManaged } from \\\"../utils/AccessManaged.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport \\\"contracts/interfaces/IRebalancer.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nstruct YieldBearingParams {\\n // Address of the asset used to mint the yield bearing asset\\n address asset;\\n // Target exposure to the collateral yield bearing asset used\\n uint64 targetExposure;\\n // Maximum exposure within the Parallelizer to the deposit asset\\n uint64 maxExposure;\\n // Minimum exposure within the Parallelizer to the deposit asset\\n uint64 minExposure;\\n // Whether limit exposures should be overriden or read onchain through the Parallelizer\\n // This value should be 1 to override exposures or 2 if these shouldn't be overriden\\n uint64 overrideExposures;\\n // Maximum slippage when dealing with the Parallelizer, bounded below 1e9 so uint64 leaves the\\n // struct packed in two slots\\n uint64 maxSlippage;\\n}\\n\\n/// @title BaseRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Abstract contract for a rebalancer that aims at rebalancing a Parallelizer\\n/// @dev This contract is an authorized fork of Angle's BaseHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/BaseHarvester.sol\\nabstract contract BaseRebalancer is IRebalancer, AccessManaged {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrusted() {\\n if (!isTrusted[msg.sender]) revert NotTrusted();\\n _;\\n }\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted or guardian to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrustedOrRestricted() {\\n if (!isTrusted[msg.sender] && !_checkCanCall(_msgSender(), _msgData())) {\\n revert NotTrustedOrGuardian();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VARIABLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reference to the `parallelizer` implementation this contract aims at rebalancing\\n IParallelizer public immutable parallelizer;\\n /// @notice TokenP handled by the `parallelizer` of interest\\n ITokenP public immutable tokenP;\\n /// @notice Data associated to a yield bearing asset\\n mapping(address => YieldBearingParams) public yieldBearingData;\\n /// @notice trusted addresses that can update target exposure and do others non critical operations\\n mapping(address => bool) public isTrusted;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EVENTS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n event Recovered(address token, uint256 amount, address to);\\n event TrustedToggled(address trusted, bool status);\\n event AllowanceReset(address indexed token, address indexed spender);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialAuthority,\\n ITokenP definitiveTokenP,\\n IParallelizer definitiveParallelizer\\n )\\n AccessManaged(initialAuthority)\\n {\\n tokenP = definitiveTokenP;\\n parallelizer = definitiveParallelizer;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n GUARDIAN FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the yieldBearingAsset data\\n * @param yieldBearingAsset address of the yieldBearingAsset\\n * @param asset address of the asset\\n * @param targetExposure target exposure to the yieldBearingAsset asset used\\n * @param minExposure minimum exposure within the Parallelizer to the asset\\n * @param maxExposure maximum exposure within the Parallelizer to the asset\\n * @param overrideExposures whether limit exposures should be overriden or read onchain through the Parallelizer\\n */\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external\\n restricted\\n {\\n _setYieldBearingAssetData(\\n yieldBearingAsset, asset, targetExposure, minExposure, maxExposure, overrideExposures, maxSlippage\\n );\\n }\\n\\n /**\\n * @notice Set the limit exposures to the asset linked to the yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n */\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) public virtual {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n if (yieldBearingInfo.overrideExposures == 2) {\\n _updateLimitExposuresYieldAsset(yieldBearingInfo.asset, yieldBearingInfo);\\n }\\n }\\n\\n /**\\n * @notice Set the max allowed slippage\\n * @param newMaxSlippage new max allowed slippage\\n */\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external restricted {\\n _setMaxSlippage(yieldBearingAsset, newMaxSlippage);\\n }\\n\\n /**\\n * @notice Toggle the trusted status of an address\\n * @param trusted address to toggle the trusted status\\n */\\n function toggleTrusted(address trusted) external restricted {\\n emit TrustedToggled(trusted, isTrusted[trusted]);\\n isTrusted[trusted] = !isTrusted[trusted];\\n }\\n\\n /**\\n * @notice Recover ERC20 tokens\\n * @param tokenAddress address of the token to recover\\n * @param amountToRecover amount to recover\\n * @param to address to send the recovered tokens\\n */\\n function recoverERC20(address tokenAddress, uint256 amountToRecover, address to) external restricted {\\n emit Recovered(tokenAddress, amountToRecover, to);\\n IERC20(tokenAddress).safeTransfer(to, amountToRecover);\\n }\\n\\n /**\\n * @notice Set an allowance this contract granted back to zero\\n * @param token address of the token\\n * @param spender address losing the allowance\\n * @dev Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing\\n * asset's configuration revokes the approvals it created, but this covers a spender that became\\n * untrusted for any other reason.\\n */\\n function resetAllowance(address token, address spender) external restricted {\\n IERC20(token).forceApprove(spender, 0);\\n emit AllowanceReset(token, spender);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n TRUSTED FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the target exposure of a yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @param targetExposure target exposure to the yield bearing asset used\\n */\\n function setTargetExposure(address yieldBearingAsset, uint64 targetExposure) external onlyTrustedOrRestricted {\\n yieldBearingData[yieldBearingAsset].targetExposure = targetExposure;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Compute the amount needed to rebalance the Parallelizer\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @return increase whether the exposure should be increased\\n * @return amount amount to be rebalanced\\n */\\n function computeRebalanceAmount(address yieldBearingAsset) external view returns (uint8 increase, uint256 amount) {\\n return _computeRebalanceAmount(yieldBearingAsset, yieldBearingData[yieldBearingAsset]);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _computeRebalanceAmount(\\n address yieldBearingAsset,\\n YieldBearingParams memory yieldBearingInfo\\n )\\n internal\\n view\\n returns (uint8 increase, uint256 amount)\\n {\\n (uint256 stablecoinsFromYieldBearingAsset, uint256 stablecoinsIssued) =\\n parallelizer.getIssuedByCollateral(yieldBearingAsset);\\n (uint256 stablecoinsFromAsset,) = parallelizer.getIssuedByCollateral(yieldBearingInfo.asset);\\n uint256 targetExposureScaled = yieldBearingInfo.targetExposure * stablecoinsIssued;\\n if (stablecoinsFromYieldBearingAsset * 1e9 > targetExposureScaled) {\\n // Need to decrease exposure to yield bearing asset\\n amount = stablecoinsFromYieldBearingAsset - targetExposureScaled / 1e9;\\n uint256 maxValueScaled = yieldBearingInfo.maxExposure * stablecoinsIssued;\\n // These checks assume that there are no transaction fees on the stablecoin->collateral conversion and so\\n // it's still possible that exposure goes above the max exposure in some rare cases\\n if (stablecoinsFromAsset * 1e9 > maxValueScaled) {\\n amount = 0;\\n } else if ((stablecoinsFromAsset + amount) * 1e9 > maxValueScaled) {\\n amount = maxValueScaled / 1e9 - stablecoinsFromAsset;\\n }\\n } else {\\n // In this case, exposure after the operation might remain slightly below the targetExposure as less\\n // collateral may be obtained by burning stablecoins for the yield asset and unwrapping it\\n increase = 1;\\n amount = targetExposureScaled / 1e9 - stablecoinsFromYieldBearingAsset;\\n uint256 minValueScaled = yieldBearingInfo.minExposure * stablecoinsIssued;\\n if (stablecoinsFromAsset * 1e9 < minValueScaled) {\\n amount = 0;\\n } else if (stablecoinsFromAsset * 1e9 < minValueScaled + amount * 1e9) {\\n amount = stablecoinsFromAsset - minValueScaled / 1e9;\\n }\\n }\\n }\\n\\n function _setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n internal\\n virtual\\n {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n address previousAsset = yieldBearingInfo.asset;\\n // Allowances are granted without expiry, so the outgoing asset would keep the yield bearing\\n // vault authorised over any of it later held here\\n if (previousAsset != address(0) && previousAsset != asset) {\\n IERC20(previousAsset).forceApprove(yieldBearingAsset, 0);\\n emit AllowanceReset(previousAsset, yieldBearingAsset);\\n _revokeAssetAllowances(yieldBearingAsset, previousAsset);\\n }\\n yieldBearingInfo.asset = asset;\\n if (targetExposure >= 1e9) revert InvalidParam();\\n if (maxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingInfo.targetExposure = targetExposure;\\n yieldBearingInfo.overrideExposures = overrideExposures;\\n yieldBearingInfo.maxSlippage = maxSlippage;\\n if (overrideExposures == 1) {\\n if (maxExposure >= 1e9 || minExposure >= maxExposure) revert InvalidParam();\\n yieldBearingInfo.maxExposure = maxExposure;\\n yieldBearingInfo.minExposure = minExposure;\\n } else {\\n yieldBearingInfo.overrideExposures = 2;\\n _updateLimitExposuresYieldAsset(asset, yieldBearingInfo);\\n }\\n }\\n\\n /// @notice Lets a rebalancer revoke the allowances it granted over an asset being rotated out\\n function _revokeAssetAllowances(address yieldBearingAsset, address previousAsset) internal virtual { }\\n\\n function _updateLimitExposuresYieldAsset(\\n address asset,\\n YieldBearingParams storage yieldBearingInfo\\n )\\n internal\\n virtual\\n {\\n uint64[] memory xFeeMint;\\n (xFeeMint,) = parallelizer.getCollateralMintFees(asset);\\n uint256 length = xFeeMint.length;\\n if (length <= 1) yieldBearingInfo.maxExposure = 1e9;\\n else yieldBearingInfo.maxExposure = xFeeMint[length - 2];\\n\\n uint64[] memory xFeeBurn;\\n (xFeeBurn,) = parallelizer.getCollateralBurnFees(asset);\\n length = xFeeBurn.length;\\n if (length <= 1) yieldBearingInfo.minExposure = 0;\\n else yieldBearingInfo.minExposure = xFeeBurn[length - 2];\\n }\\n\\n function _setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) internal virtual {\\n if (newMaxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingData[yieldBearingAsset].maxSlippage = newMaxSlippage;\\n }\\n\\n function _scaleAmountBasedOnDecimals(\\n uint256 decimalsTokenIn,\\n uint256 decimalsTokenOut,\\n uint256 amountIn,\\n bool assetIn\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (decimalsTokenIn > decimalsTokenOut) {\\n if (assetIn) {\\n amountIn /= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n } else {\\n amountIn *= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n }\\n } else if (decimalsTokenIn < decimalsTokenOut) {\\n if (assetIn) {\\n amountIn *= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n } else {\\n amountIn /= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n }\\n }\\n return amountIn;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPER \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _adjustAllowance(address token, address sender, uint256 amountIn) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), sender);\\n if (allowance < amountIn) IERC20(token).safeIncreaseAllowance(sender, type(uint256).max - allowance);\\n }\\n}\\n\",\"keccak256\":\"0x5d05479be1ac7d1dc738cb8fc2e539c82e88a2191dee278cc74fd647eed17ebc\",\"license\":\"GPL-3.0\"},\"project/contracts/helpers/GenericRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC3156FlashBorrower } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol\\\";\\nimport { IERC3156FlashLender } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol\\\";\\nimport { RouterSwapper } from \\\"@helpers/RouterSwapper.sol\\\";\\n\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IERC4626 } from \\\"contracts/interfaces/external/IERC4626.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nimport { BaseRebalancer, YieldBearingParams } from \\\"./BaseRebalancer.sol\\\";\\n\\nenum SwapType {\\n VAULT,\\n SWAP\\n}\\n\\n/// @title GenericRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Generic contract for trusted callers to adjust the reserves of Angle Parallelizer\\n/// @dev This contract is an authorized fork of Angle's GenericHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\\ncontract GenericRebalancer is BaseRebalancer, IERC3156FlashBorrower, RouterSwapper {\\n using SafeCast for uint256;\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant CALLBACK_SUCCESS = keccak256(\\\"ERC3156FlashBorrower.onFlashLoan\\\");\\n\\n /// @notice Parallel stablecoin flashloan contract\\n IERC3156FlashLender public immutable flashloan;\\n /// @notice Budget of tokenP available for each users\\n mapping(address => uint256) public budget;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INITIALIZATION \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialTokenTransferAddress,\\n address initialSwapRouter,\\n ITokenP definitivetokenP,\\n IParallelizer definitiveParallelizer,\\n address initialAuthority,\\n IERC3156FlashLender definitiveFlashloan\\n )\\n RouterSwapper(initialSwapRouter, initialTokenTransferAddress)\\n BaseRebalancer(initialAuthority, definitivetokenP, definitiveParallelizer)\\n {\\n if (address(definitiveFlashloan) == address(0)) revert ZeroAddress();\\n flashloan = definitiveFlashloan;\\n\\n IERC20(tokenP).approve(address(definitiveFlashloan), type(uint256).max);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n BUDGET HANDLING\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Add budget to be spent by the receiver during the flashloan\\n * @param amount amount of tokenP to add to the budget\\n * @param receiver address of the receiver\\n */\\n function addBudget(uint256 amount, address receiver) public virtual {\\n budget[receiver] += amount;\\n\\n IERC20(tokenP).safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Remove budget from the owner and send it to the receiver\\n * @param amount amount of tokenP to remove from the budget\\n * @param receiver address of the receiver\\n */\\n function removeBudget(uint256 amount, address receiver) public virtual {\\n budget[msg.sender] -= amount; // Will revert if not enough funds\\n\\n IERC20(tokenP).safeTransfer(receiver, amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HARVEST\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure\\n /// to this yieldBearingAsset\\n /// @dev This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up\\n /// some yieldBearingAsset that can then be used for people looking to burn deposit tokens\\n /// @dev Due to potential transaction fees within the Parallelizer, this function doesn't exactly bring\\n /// `yieldBearingAsset` to the target exposure\\n /// @dev scale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest,\\n /// it is used to lower the amount of the asset to harvest for example to have a lower slippage\\n /// @dev Restricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the\\n /// collateral oracle, neither of which can be safely exposed to arbitrary callers\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) public virtual onlyTrusted {\\n if (scale > 1e9) revert InvalidParam();\\n updateLimitExposuresYieldAsset(yieldBearingAsset);\\n YieldBearingParams memory yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n (uint8 increase, uint256 amount) = _computeRebalanceAmount(yieldBearingAsset, yieldBearingInfo);\\n amount = (amount * scale) / 1e9;\\n if (amount == 0) revert ZeroAmount();\\n (SwapType swapType, bytes memory data) = abi.decode(extraData, (SwapType, bytes));\\n try parallelizer.updateOracle(yieldBearingAsset) { } catch { }\\n _adjustYieldExposure(\\n amount,\\n increase,\\n yieldBearingAsset,\\n yieldBearingInfo.asset,\\n (amount * (1e9 - yieldBearingInfo.maxSlippage)) / 1e9,\\n swapType,\\n data\\n );\\n }\\n\\n /// @inheritdoc IERC3156FlashBorrower\\n /// @dev A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any\\n /// shortfall between the principal and the tokenP the rebalance minted back\\n function onFlashLoan(\\n address initiator,\\n address,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n )\\n public\\n virtual\\n returns (bytes32)\\n {\\n if (msg.sender != address(flashloan) || initiator != address(this)) revert NotTrusted();\\n address sender;\\n uint256 typeAction;\\n uint256 minAmountOut;\\n SwapType swapType;\\n bytes memory callData;\\n address tokenOut;\\n address tokenIn;\\n {\\n address yieldBearingAsset;\\n address asset;\\n (sender, typeAction, yieldBearingAsset, asset, minAmountOut, swapType, callData) =\\n abi.decode(data, (address, uint256, address, address, uint256, SwapType, bytes));\\n if (typeAction == 1) {\\n // Increase yield exposure action: we bring in the yield bearing asset\\n tokenOut = yieldBearingAsset;\\n tokenIn = asset;\\n } else {\\n // Decrease yield exposure action: we bring in the deposit asset\\n tokenIn = yieldBearingAsset;\\n tokenOut = asset;\\n }\\n }\\n uint256 tokenInBalanceBefore = IERC20(tokenIn).balanceOf(address(this));\\n\\n uint256 amountOut =\\n parallelizer.swapExactInput(amount, 0, address(tokenP), tokenIn, address(this), block.timestamp);\\n // The principal is spent, what the lender will pull back is the principal plus its fee\\n amount += fee;\\n\\n // Swap to tokenOut\\n amountOut = _swapToTokenOut(typeAction, tokenIn, tokenOut, amountOut, swapType, callData);\\n\\n _adjustAllowance(tokenOut, address(parallelizer), amountOut);\\n uint256 amountStableOut =\\n parallelizer.swapExactInput(amountOut, minAmountOut, tokenOut, address(tokenP), address(this), block.timestamp);\\n\\n amountStableOut += _recoverResidualInput(tokenIn, tokenInBalanceBefore);\\n\\n if (amount > amountStableOut) {\\n budget[sender] -= amount - amountStableOut; // Will revert if not enough funds\\n } else if (amountStableOut > amount) {\\n budget[sender] += amountStableOut - amount;\\n }\\n return CALLBACK_SUCCESS;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SETTERS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the token transfer contract\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress) public override restricted {\\n super.setTokenTransferAddress(newTokenTransferAddress);\\n }\\n\\n /**\\n * @notice Set the swap router\\n * @param newSwapRouter address of the swap router\\n */\\n function setSwapRouter(address newSwapRouter) public override restricted {\\n super.setSwapRouter(newSwapRouter);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNALS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Burns `amountStablecoins` for one yieldBearing asset, swap for asset then mints deposit tokens\\n /// from the proceeds of the swap.\\n /// @dev If `increase` is 1, then the system tries to increase its exposure to the yield bearing asset which means\\n /// burning tokenP for the deposit asset, swapping for the yield bearing asset, then minting the tokenP\\n /// @dev This function reverts if the second tokenP mint gives less than `minAmountOut` of ag tokens\\n /// @dev This function reverts if the swap slippage is higher than `maxSlippage`\\n function _adjustYieldExposure(\\n uint256 amountStablecoins,\\n uint8 increase,\\n address yieldBearingAsset,\\n address asset,\\n uint256 minAmountOut,\\n SwapType swapType,\\n bytes memory extraData\\n )\\n internal\\n {\\n flashloan.flashLoan(\\n IERC3156FlashBorrower(address(this)),\\n address(tokenP),\\n amountStablecoins,\\n abi.encode(msg.sender, increase, yieldBearingAsset, asset, minAmountOut, swapType, extraData)\\n );\\n }\\n\\n /**\\n * @dev Returns any input the route did not consume to the Parallelizer\\n * @param tokenIn address of the token offered to the route\\n * @param balanceBefore balance of `tokenIn` held before the operation\\n * @return the tokenP obtained from the remainder, zero when the route consumed everything\\n *\\n * Router calldata is built off chain while the input is sized on chain, so a route can consume\\n * less than was offered. Returning the remainder keeps it inside the Parallelizer's accounting\\n * instead of stranding it here, and it settles with the rest of the operation.\\n */\\n function _recoverResidualInput(address tokenIn, uint256 balanceBefore) internal returns (uint256) {\\n uint256 balanceAfter = IERC20(tokenIn).balanceOf(address(this));\\n if (balanceAfter <= balanceBefore) return 0;\\n uint256 residual = balanceAfter - balanceBefore;\\n _adjustAllowance(tokenIn, address(parallelizer), residual);\\n return parallelizer.swapExactInput(residual, 0, tokenIn, address(tokenP), address(this), block.timestamp);\\n }\\n\\n function _swapToTokenOut(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n SwapType swapType,\\n bytes memory callData\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (swapType == SwapType.SWAP) {\\n amountOut = _swapToTokenOutSwap(tokenIn, tokenOut, amount, callData);\\n } else if (swapType == SwapType.VAULT) {\\n amountOut = _swapToTokenOutVault(typeAction, tokenIn, tokenOut, amount);\\n }\\n }\\n\\n /**\\n * @notice Swap token using the router/aggregator\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n * @param callData bytes to call the router/aggregator\\n */\\n function _swapToTokenOutSwap(\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n bytes memory callData\\n )\\n internal\\n returns (uint256)\\n {\\n uint256 balance = IERC20(tokenOut).balanceOf(address(this));\\n\\n address[] memory tokens = new address[](1);\\n tokens[0] = tokenIn;\\n bytes[] memory callDatas = new bytes[](1);\\n callDatas[0] = callData;\\n uint256[] memory amounts = new uint256[](1);\\n amounts[0] = amount;\\n _swap(tokens, callDatas, amounts);\\n // A route that consumed less than offered would otherwise leave the difference approved\\n IERC20(tokenIn).forceApprove(tokenTransferAddress, 0);\\n\\n return IERC20(tokenOut).balanceOf(address(this)) - balance;\\n }\\n\\n /**\\n * @dev Deposit or redeem the vault asset\\n * @param typeAction 1 for deposit, 2 for redeem\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n */\\n function _swapToTokenOutVault(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (typeAction == 1) {\\n // Granting allowance with the yieldBearingAsset for the vault asset\\n _adjustAllowance(tokenIn, tokenOut, amount);\\n amountOut = IERC4626(tokenOut).deposit(amount, address(this));\\n } else {\\n amountOut = IERC4626(tokenIn).redeem(amount, address(this), address(this));\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe10b65b2a75ead0d938a2282cf478e94ea425adb38a03ca077fa0422ec2d322c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IDiamondCut\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondCut.sol by mudgen\\n/// @dev This interface is an authorized fork of Angle's `IDiamondCut` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IDiamondCut.sol\\ninterface IDiamondCut {\\n /// @notice Add/replace/remove any number of functions and optionally execute a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments, executed with delegatecall on\\n /// _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x08a01f77b740f7da424f0ea27a6a292f9e292058e23d1fe960d2d19a44496c7b\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondEtherscan.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IDiamondEtherscan\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface IDiamondEtherscan {\\n /// @notice Sets a dummy implementation with the same layout at the diamond proxy contract with all its facets\\n function setDummyImplementation(address _implementation) external;\\n\\n /// @notice Address of the dummy implementation used to make the DiamondProxy contract interpretable by Etherscan\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xf742b55592d129e02fb755d25f7a97ed976a14c4c744d6ac46726809e8f1e037\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @notice IDiamondLoupe\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondLoupe.sol by mudgen\\ninterface IDiamondLoupe {\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xa5580958acabe2c44967e835e77a748eb0b8812f70cd071191201508c9388ca8\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IDiamondCut } from \\\"./IDiamondCut.sol\\\";\\nimport { IDiamondEtherscan } from \\\"./IDiamondEtherscan.sol\\\";\\nimport { IDiamondLoupe } from \\\"./IDiamondLoupe.sol\\\";\\nimport { IGetters } from \\\"./IGetters.sol\\\";\\nimport { IRedeemer } from \\\"./IRedeemer.sol\\\";\\nimport { IRewardHandler } from \\\"./IRewardHandler.sol\\\";\\nimport { ISettersGovernor, ISettersGuardian } from \\\"./ISetters.sol\\\";\\nimport { ISwapper } from \\\"./ISwapper.sol\\\";\\nimport { ISurplus } from \\\"./ISurplus.sol\\\";\\n\\n/// @title IParallelizer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuter` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuter.sol\\ninterface IParallelizer is\\n IDiamondCut,\\n IDiamondEtherscan,\\n IDiamondLoupe,\\n IGetters,\\n IRedeemer,\\n IRewardHandler,\\n ISettersGovernor,\\n ISettersGuardian,\\n ISwapper,\\n ISurplus\\n{ }\\n\",\"keccak256\":\"0x3d43efebf663185429a411300477c3a62bf5e025fb286cf812cd0b589fb8bd5a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IHarvester` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IHarvester.sol\\ninterface IRebalancer {\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address stablecoin,\\n uint64 targetExposure,\\n uint64 minExposureYieldAsset,\\n uint64 maxExposureYieldAsset,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external;\\n\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) external;\\n\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external;\\n\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) external;\\n}\\n\",\"keccak256\":\"0x0a30a492e29ebe67db0f4cac7bfb142d04556a61282e71733d13c11daeba08b1\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISurplus.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISurplus {\\n /// @dev This function will swap the surplus of a collateral for the stable asset link to the protocol.\\n /// @param collateral The collateral address to process the surplus of.\\n /// @param maxCollateralAmount The maximum amount of collateral to process. If 0, processes the full surplus.\\n /// @return collateralSurplus The surplus of the collateral actually processed.\\n /// @return stableSurplus The surplus amount in stable calculated from the collateral surplus.\\n /// @return issuedAmount The amount of newly issued stablecoins from the collateral swapped\\n function processSurplus(\\n address collateral,\\n uint256 maxCollateralAmount\\n )\\n external\\n returns (uint256 collateralSurplus, uint256 stableSurplus, uint256 issuedAmount);\\n\\n /// @notice Releases the income to the payees\\n /// @return payees The addresses of the payees\\n /// @return amounts The amounts released to the payees\\n function release() external returns (address[] memory payees, uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x0129ea80a666d553ddd13c02f56a72cc96a6ac4e45578f0f523def2732ce450f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISwapper\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISwapper` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISwapper.sol\\ninterface ISwapper {\\n /// @notice Swaps (that is to say mints or burns) an exact amount of `tokenIn` for an amount of `tokenOut`\\n /// @param amountIn Amount of `tokenIn` to bring\\n /// @param amountOutMin Minimum amount of `tokenOut` to get: if `amountOut` is inferior to this amount, the\\n /// function will revert\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountOut Amount of `tokenOut` obtained through the swap\\n function swapExactInput(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactInput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactInputWithPermit(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Swaps (that is to say mints or burns) an amount of `tokenIn` for an exact amount of `tokenOut`\\n /// @param amountOut Amount of `tokenOut` to obtain from the swap\\n /// @param amountInMax Maximum amount of `tokenIn` to bring in order to get `amountOut` of `tokenOut`\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountIn Amount of `tokenIn` used to perform the swap\\n function swapExactOutput(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactOutput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactOutputWithPermit(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactInput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeSwapExactInputNonce(...)`,\\n /// which binds the full swap intent. `authData.nonce` carries the caller-chosen `userSalt`; the\\n /// facet recomputes the derived nonce from the call arguments before forwarding it to the\\n /// token, so any tampering with `to`/slippage/deadline invalidates the signature.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactInputWithAuthorization(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactOutput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The authorization must be signed for `amountInMax`; the excess is refunded to the\\n /// authorizer. Derived-nonce scheme as in `swapExactInputWithAuthorization`, using\\n /// `LibAuthorization.computeSwapExactOutputNonce(...)`.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactOutputWithAuthorization(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Simulates what a call to `swapExactInput` with `amountIn` of `tokenIn` for `tokenOut` would give.\\n /// If called right before and at the same block, the `amountOut` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactInput`\\n function quoteIn(uint256 amountIn, address tokenIn, address tokenOut) external view returns (uint256 amountOut);\\n\\n /// @notice Simulates what a call to `swapExactOutput` for `amountOut` of `tokenOut` with `tokenIn` would give.\\n /// If called right before and at the same block, the `amountIn` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactOutput`\\n function quoteOut(uint256 amountOut, address tokenIn, address tokenOut) external view returns (uint256 amountIn);\\n}\\n\",\"keccak256\":\"0xbf7e08cff6dd51c222f86976d3526307098b80100c81978a55566043924cfc06\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/// @notice ERC4626 interface\\n/// @author OpenZeppelin\\n/// @dev In this implementation, the interface only contains the functions that the IERC4626 interface adds on top of\\n/// the IERC20 interface\\ninterface IERC4626 {\\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\":\"0xd730d6a6b679201eec89dff3133de651da20b3e72e74f01b734078bfacf952ad\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/AccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { IAccessManaged } from \\\"@openzeppelin/contracts/access/manager/IAccessManaged.sol\\\";\\nimport { Context } from \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\n/// @title AccessControl\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Fork of OpenZeppelin's `AccessManaged` contract\\n/// updated to make _checkCanCall to return bool\\n/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/manager/AccessManaged.sol\\ncontract AccessManaged is Context, IAccessManaged {\\n address private _authority;\\n\\n bool private _consumingSchedule;\\n\\n /**\\n * @dev Initializes the contract connected to an initial authority.\\n */\\n constructor(address initialAuthority) {\\n _setAuthority(initialAuthority);\\n }\\n\\n /**\\n * @dev Restricts access to a function as defined by the connected Authority for this contract and the\\n * caller and selector of the function that entered the contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * In general, this modifier should only be used on `external` functions. It is okay to use it on `public`\\n * functions that are used as external entry points and are not called internally. Unless you know what you're\\n * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security\\n * implications! This is because the permissions are determined by the function that entered the contract, i.e. the\\n * function at the bottom of the call stack, and not the function where the modifier is visible in the source code.\\n * ====\\n *\\n * [WARNING]\\n * ====\\n * Avoid adding this modifier to the\\n * https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]\\n * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These\\n * functions are the only execution paths where a function selector cannot be unambiguously determined from the\\n * calldata\\n * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()`\\n * function\\n * if no calldata is provided. (See {_checkCanCall}).\\n *\\n * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.\\n * ====\\n */\\n modifier restricted() {\\n address caller = _msgSender();\\n require(_checkCanCall(caller, _msgData()), AccessManagedUnauthorized(caller));\\n _;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function authority() public view virtual returns (address) {\\n return _authority;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function setAuthority(address newAuthority) public virtual {\\n address caller = _msgSender();\\n if (caller != authority()) {\\n revert AccessManagedUnauthorized(caller);\\n }\\n if (newAuthority.code.length == 0) {\\n revert AccessManagedInvalidAuthority(newAuthority);\\n }\\n _setAuthority(newAuthority);\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function isConsumingScheduledOp() public view returns (bytes4) {\\n return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /**\\n * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the\\n * permissions set by the current authority.\\n */\\n function _setAuthority(address newAuthority) internal virtual {\\n _authority = newAuthority;\\n emit AuthorityUpdated(newAuthority);\\n }\\n\\n function _checkCanCall(address caller, bytes calldata data) internal virtual returns (bool) {\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(authority(), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n _consumingSchedule = true;\\n IAccessManager(authority()).consumeScheduledOp(caller, data);\\n _consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x40dfee0e736695b3005df6c150a2d794ac06f3f4b91745e2959623e770044798\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"},\"project/libs/helpers/RouterSwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/// @title Swapper\\n/// @author Angle Labs, Inc.\\n/// @dev Abstract contract for swapping tokens using a router/aggregator\\n/// @dev This contract is an authorized fork of Angle's `RouterSwapper` contract\\n/// https://github.com/AngleProtocol/utils/blob/main/src/RouterSwapper.sol\\nabstract contract RouterSwapper {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERRORS\\n //////////////////////////////////////////////////////////////*/\\n\\n error SwapError();\\n error ZeroAddress();\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Event emitted when the swap router is updated\\n */\\n event SwapRouterUpdated(address newSwapRouter);\\n /**\\n * @notice Event emitted when the token proxy is updated\\n */\\n event TokenTransferAddressUpdated(address newTokenTransferAddress);\\n\\n /*//////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////*/\\n\\n modifier noZeroAddress(address targetAddress) {\\n if (targetAddress == address(0)) {\\n revert ZeroAddress();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n MUTABLE VARIABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice address of the router/aggregator\\n */\\n address public swapRouter;\\n /**\\n * @notice address to approve to transfer tokens to\\n */\\n address public tokenTransferAddress;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(address initialSwapRouter, address initialTokenTransferAddress) {\\n swapRouter = initialSwapRouter;\\n tokenTransferAddress = initialTokenTransferAddress;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the router/aggregator address\\n * @param newSwapRouter address of the new router/aggregator\\n */\\n function setSwapRouter(address newSwapRouter) public virtual noZeroAddress(newSwapRouter) {\\n swapRouter = newSwapRouter;\\n\\n emit SwapRouterUpdated(newSwapRouter);\\n }\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the new token transfer address\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress)\\n public\\n virtual\\n noZeroAddress(newTokenTransferAddress)\\n {\\n tokenTransferAddress = newTokenTransferAddress;\\n\\n emit TokenTransferAddressUpdated(newTokenTransferAddress);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n SWAP FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Approve the router/aggregator to spend the token if needed\\n * @param token address of the token to approve\\n * @param spender address of the router/aggregator\\n * @param amount amount to approve\\n */\\n function _approveTokenIfNeeded(address token, address spender, uint256 amount) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), spender);\\n if (allowance < amount) {\\n IERC20(token).safeIncreaseAllowance(spender, amount - allowance);\\n }\\n }\\n\\n /**\\n * @notice Perform the swap using the router/aggregator\\n * @param callData bytes to call the router/aggregator\\n */\\n function _performRouterSwap(bytes memory callData) internal {\\n (bool success, bytes memory retData) = swapRouter.call(callData);\\n\\n if (!success) {\\n if (retData.length != 0) {\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, retData), mload(retData))\\n }\\n }\\n revert SwapError();\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swapCalldata(address[] calldata tokens, bytes[] calldata callDatas, uint256[] calldata amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swap(address[] memory tokens, bytes[] memory callDatas, uint256[] memory amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8c5a6b026a95816806814ef681b6b225ea4c405a39a4eab0111921853202829c\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "storageLayout": { + "storage": [ + { + "astId": 29857, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_authority", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 29859, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_consumingSchedule", + "offset": 20, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 10262, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "yieldBearingData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)" + }, + { + "astId": 10267, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "isTrusted", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 30616, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "swapRouter", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 30619, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "tokenTransferAddress", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 11058, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "budget", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct YieldBearingParams)", + "numberOfBytes": "32", + "value": "t_struct(YieldBearingParams)10202_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(YieldBearingParams)10202_storage": { + "encoding": "inplace", + "label": "struct YieldBearingParams", + "members": [ + { + "astId": 10191, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "asset", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 10193, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "targetExposure", + "offset": 20, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 10195, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxExposure", + "offset": 0, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10197, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "minExposure", + "offset": 8, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10199, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "overrideExposures", + "offset": 16, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10201, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxSlippage", + "offset": 24, + "slot": "1", + "type": "t_uint64" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + }, + "userdoc": { + "events": { + "SwapRouterUpdated(address)": { + "notice": "Event emitted when the swap router is updated" + }, + "TokenTransferAddressUpdated(address)": { + "notice": "Event emitted when the token proxy is updated" + } + }, + "kind": "user", + "methods": { + "addBudget(uint256,address)": { + "notice": "Add budget to be spent by the receiver during the flashloan" + }, + "budget(address)": { + "notice": "Budget of tokenP available for each users" + }, + "computeRebalanceAmount(address)": { + "notice": "Compute the amount needed to rebalance the Parallelizer" + }, + "flashloan()": { + "notice": "Parallel stablecoin flashloan contract" + }, + "harvest(address,uint256,bytes)": { + "notice": "Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset" + }, + "isTrusted(address)": { + "notice": "trusted addresses that can update target exposure and do others non critical operations" + }, + "parallelizer()": { + "notice": "Reference to the `parallelizer` implementation this contract aims at rebalancing" + }, + "recoverERC20(address,uint256,address)": { + "notice": "Recover ERC20 tokens" + }, + "removeBudget(uint256,address)": { + "notice": "Remove budget from the owner and send it to the receiver" + }, + "resetAllowance(address,address)": { + "notice": "Set an allowance this contract granted back to zero" + }, + "setMaxSlippage(address,uint64)": { + "notice": "Set the max allowed slippage" + }, + "setSwapRouter(address)": { + "notice": "Set the swap router" + }, + "setTargetExposure(address,uint64)": { + "notice": "Set the target exposure of a yield bearing asset" + }, + "setTokenTransferAddress(address)": { + "notice": "Set the token transfer address" + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "notice": "Set the yieldBearingAsset data" + }, + "swapRouter()": { + "notice": "address of the router/aggregator" + }, + "toggleTrusted(address)": { + "notice": "Toggle the trusted status of an address" + }, + "tokenP()": { + "notice": "TokenP handled by the `parallelizer` of interest" + }, + "tokenTransferAddress()": { + "notice": "address to approve to transfer tokens to" + }, + "updateLimitExposuresYieldAsset(address)": { + "notice": "Set the limit exposures to the asset linked to the yield bearing asset" + }, + "yieldBearingData(address)": { + "notice": "Data associated to a yield bearing asset" + } + }, + "version": 1 + }, + "argsData": "0x000000000000000000000000744489ee3d540777a66f2cf297479745e0852f7a000000000000000000000000744489ee3d540777a66f2cf297479745e0852f7a000000000000000000000000be65f0f410a72bec163dc65d46c83699e957d5880000000000000000000000001250304f66404cd153fa39388ddcdaec7e0f1707000000000000000000000000028c3e3a0984c441c5205cfd0c39a6cf244ee69600000000000000000000000015452454a9735d68df430879b2941316a09295b1", + "transaction": { + "nonce": "0xdc", + "hash": "0x21ab1bb91673e694594eb8d8daa2270401ffa3abd090c9c7a9170981c7b6d27e", + "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" + }, + "receipt": { + "blockHash": "0x683b8792ef031ed72bb7cad4fe3d544ad3170c47f5b70b4f98ab39bb9b19bb7d", + "blockNumber": "0x2e5a0e4", + "transactionIndex": "0x4" + } +} \ No newline at end of file diff --git a/deployments/hyperevm/Getters.json b/deployments/hyperevm/Getters.json index eeca865..916c23d 100644 --- a/deployments/hyperevm/Getters.json +++ b/deployments/hyperevm/Getters.json @@ -1,5 +1,5 @@ { - "address": "0xf1b0c99fa5fc90410cca1219cabb91fc7e752292", + "address": "0xa6fdbd9953837157aab1b43280f27321da621abf", "abi": [ { "inputs": [], @@ -549,6 +549,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getSwapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getTotalIssued", @@ -752,8 +765,8 @@ ], "contractName": "Getters", "sourceName": "contracts/parallelizer/facets/Getters.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061415b8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506141968061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -804,7 +817,7 @@ "getSlippageTolerance(address)": { "details": "Maximum slippage tolerance is 1e9 (100%)" }, - "getSurplusBufferRatio()": { + "getSwapRouter()": { "details": "Expressed in base 1e9, and always >= 1e9" }, "isConsumingScheduledOp()": { @@ -823,9 +836,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3346200", - "executionCost": "3721", - "totalCost": "3349921" + "codeDepositCost": "3358000", + "executionCost": "3737", + "totalCost": "3361737" }, "external": { "accessManager()": "2418", @@ -847,7 +860,8 @@ "getShares(address)": "2561", "getSlippageTolerance(address)": "2564", "getStablecoinCap(address)": "infinite", - "getSurplusBufferRatio()": "2356", + "getSurplusBufferRatio()": "2334", + "getSwapRouter()": "2420", "getTotalIssued()": "infinite", "getTotalShares()": "2369", "isConsumingScheduledOp()": "infinite", @@ -862,7 +876,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSurplusBufferRatio()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSurplusBufferRatio()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processing\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x04f12ddeb53bb3bba9aaf9a93c62a84076cca496642d4d87556b15120b60e07b\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0xd53f1dc85e3e3b30205017bf00b54c9b511963034d382ecc647e65ad854b314e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSwapRouter()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSwapRouter()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSwapRouter() external view returns (address) {\\n return s.transmuterStorage().swapRouter;\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0x7698420203383c245b91740b40652708e240877ec9d006d211556c7ffe0406e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -927,8 +941,8 @@ "getStablecoinCap(address)": { "notice": "Returns the stablecoin cap for `collateral`" }, - "getSurplusBufferRatio()": { - "notice": "Returns the minimum collateral ratio that must hold after surplus processing" + "getSwapRouter()": { + "notice": "Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to" }, "getTotalIssued()": { "notice": "Returns the total amount of stablecoins issued through Parallelizer" @@ -965,13 +979,13 @@ }, "argsData": "0x", "transaction": { - "nonce": "0xbe", - "hash": "0x7498172921a450125306b2ccf9320adaf7f0b1bbe872c5d0662f6d704ead962d", + "nonce": "0xd9", + "hash": "0xf564436c225cb75aae77314a87593b13809951ecbf69d083cc270f94fb589582", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0xcb5e8c5c5eff389b69723f8bf2701b4ff4a13e24f919c95c0c686081bf66bbf0", - "blockNumber": "0x2765cbd", - "transactionIndex": "0x4" + "blockHash": "0x2b5fe74008daf924b8cdceb735201cd7bf072ca3d508f3c21b8672c422b40d07", + "blockNumber": "0x2e5a02d", + "transactionIndex": "0x2" } } \ No newline at end of file diff --git a/deployments/hyperevm/Redeemer.json b/deployments/hyperevm/Redeemer.json index 056926f..9b212b4 100644 --- a/deployments/hyperevm/Redeemer.json +++ b/deployments/hyperevm/Redeemer.json @@ -1,5 +1,5 @@ { - "address": "0x15df158044cbc28d31cde8b754f19856571dc169", + "address": "0xe2642f5bb0ea193918f50cd8cd8f427a0b6b88d3", "abi": [ { "inputs": [], @@ -78,6 +78,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "UnexpectedRedemptionTokens", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -179,6 +184,11 @@ "internalType": "uint256[]", "name": "minAmountOuts", "type": "uint256[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeem", @@ -224,6 +234,11 @@ "name": "forfeitTokens", "type": "address[]" }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" + }, { "internalType": "bytes", "name": "authData", @@ -272,6 +287,11 @@ "internalType": "address[]", "name": "forfeitTokens", "type": "address[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeemWithForfeit", @@ -317,8 +337,8 @@ ], "contractName": "Redeemer", "sourceName": "contracts/parallelizer/facets/Redeemer.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50613a5c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50613b148061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -347,10 +367,11 @@ "tokens": "List of tokens that would be given" } }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "details": "The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function", "params": { "deadline": "Timestamp before which the redemption should have occured", + "expectedTokensHash": "`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects", "minAmountOuts": "Minimum amount of each token given back in the redemption to obtain", "receiver": "Address which should be receiving the output tokens" }, @@ -359,10 +380,10 @@ "tokens": "List of tokens returned" } }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { - "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`." + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { + "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list" }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "details": "Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount" }, "updateNormalizer(uint256,bool)": { @@ -375,28 +396,28 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "2988000", - "executionCost": "3276", - "totalCost": "2991276" + "codeDepositCost": "3024800", + "executionCost": "3323", + "totalCost": "3028123" }, "external": { "quoteRedemptionCurve(uint256)": "infinite", - "redeem(uint256,address,uint256,uint256[])": "infinite", - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": "infinite", - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": "infinite", + "redeem(uint256,address,uint256,uint256[],bytes32)": "infinite", + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": "infinite", + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": "infinite", "updateNormalizer(uint256,bool)": "infinite" }, "internal": { - "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_distributeRedemption(struct Redeemer.RedemptionExecution memory)": "infinite", - "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_quoteRedemptionCurve(uint256)": "infinite", - "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_updateNormalizer(uint256,bool)": "infinite" } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[])\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[])\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the\\n /// signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x2ea4d5ebd3dd0e83071ebedb2c269f501f37033ddce9a1ee9ec40cfde0adfc7a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n _updateNormalizer(amount, false);\\n\\n redemption.from = _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(\\n redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config\\n );\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP)).receiveWithAuthorization(\\n params.from,\\n address(this),\\n params.value,\\n params.validAfter,\\n params.validBefore,\\n derivedNonce,\\n params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x52467df54a2a68910287c51c0ee42d304de44a7ccacd22fff8426911835356f3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe41991a0a564f4f6443aeffd6f1519ae3decc8a9e1e625f51ddf2168453ea4f2\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedRedemptionTokens\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"expectedTokensHash\":\"`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n // `minAmountOuts` is positional, so it only protects quantities. Binding the output list itself is what\\n // ties each minimum to the token it was quoted against, across a collateral rotation\\n if (keccak256(abi.encodePacked(redemption.tokens)) != expectedTokensHash) revert UnexpectedRedemptionTokens();\\n _updateNormalizer(amount, false);\\n\\n redemption.from =\\n _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config);\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP))\\n .receiveWithAuthorization(\\n params.from, address(this), params.value, params.validAfter, params.validBefore, derivedNonce, params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x1a67602de708b202cbfb4311b65c8e28294c043d059c53c66dcd9c7b1512d3c0\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 expectedTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d4;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the redemption output list the\\n /// authorizer was quoted, binding token identity and ordering rather than raw amounts alone\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n expectedTokensHash,\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x195b02224ec034756820857b7f88acc6ace194d00a68a9a6f0bcb8adf38963c8\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -407,13 +428,13 @@ "quoteRedemptionCurve(uint256)": { "notice": "Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block" }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "notice": "Redeems `amount` of stablecoins from the system" }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { "notice": "Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer." }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "notice": "Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`." }, "updateNormalizer(uint256,bool)": { @@ -424,13 +445,13 @@ }, "argsData": "0x", "transaction": { - "nonce": "0xc0", - "hash": "0x864813682e8f46c2c5b0f71bfc457a55609af9662826bb4e582276856059d93a", + "nonce": "0xda", + "hash": "0x1aa360cf2ac6aa671df115dcdd103776903e1454822864559f671234057683eb", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0xf4373a86f7d4ac5d589295f9f776d88ecfaac4963b807d97c734482692461c1c", - "blockNumber": "0x2765d37", - "transactionIndex": "0x4" + "blockHash": "0x1c6e4b009d5a84471993c3e5722be38f102176718b4b57d821086e5d8f7de24e", + "blockNumber": "0x2e5a06a", + "transactionIndex": "0x1" } } \ No newline at end of file diff --git a/deployments/hyperevm/RewardHandler.json b/deployments/hyperevm/RewardHandler.json index 066aa85..1a5d6cc 100644 --- a/deployments/hyperevm/RewardHandler.json +++ b/deployments/hyperevm/RewardHandler.json @@ -1,5 +1,5 @@ { - "address": "0xabe6b4b321a5d07fafb7350dae06cfbdac3e81ae", + "address": "0x619eb29e1643cde2b2117d6b7524848f540346f3", "abi": [ { "inputs": [], @@ -18,12 +18,12 @@ }, { "inputs": [], - "name": "OdosSwapFailed", + "name": "ReentrantCall", "type": "error" }, { "inputs": [], - "name": "ReentrantCall", + "name": "RewardSwapFailed", "type": "error" }, { @@ -42,6 +42,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -88,8 +93,8 @@ ], "contractName": "RewardHandler", "sourceName": "contracts/parallelizer/facets/RewardHandler.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50610fa08061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50610fd38061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -108,7 +113,7 @@ "kind": "dev", "methods": { "sellRewards(uint256,bytes)": { - "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped" + "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped" } }, "title": "RewardHandler", @@ -117,9 +122,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "800000", - "executionCost": "829", - "totalCost": "800829" + "codeDepositCost": "810200", + "executionCost": "842", + "totalCost": "811042" }, "external": { "sellRewards(uint256,bytes)": "infinite" @@ -129,7 +134,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OdosSwapFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a odos call\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to odos\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xff2afcbc8d1c25297324159d3684a323e60b3c9408129aba70d3d6938d093255\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to Odos router for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = ODOS_ROUTER.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes odos revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert OdosSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xf01917011b3966f1783fa024ce6c56b5294ef0f65531bdc3f2e068649cd45038\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardSwapFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to the configured `swapRouter` for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n address swapRouter = ts.swapRouter;\\n if (swapRouter == address(0)) revert ZeroAddress();\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = swapRouter.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes the router's revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert RewardSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xa4e2fdeaaa43d78dfe1a81f458108856ebc92f27a7194e6293ac3c5084325beb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -145,13 +150,13 @@ }, "argsData": "0x", "transaction": { - "nonce": "0xc1", - "hash": "0x8c0d1c625b2aa9313077be501076bfd40a7c50e334b89ef21f71158888bb93d6", + "nonce": "0xdb", + "hash": "0x9fd0ecc18415f626b0c8231fc061324f9cc1a0491c4204c12ea32b33ee89cb12", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0x40fd062aa586d13b1c95cf150e435273c525ffdec16c01989dbc9054e19f4deb", - "blockNumber": "0x2765db1", - "transactionIndex": "0x2" + "blockHash": "0x53d1fcd4815fb59635f9e3ca2f4656dd60b02c6ae52305ca80dde63cdc260800", + "blockNumber": "0x2e5a0a7", + "transactionIndex": "0x1" } } \ No newline at end of file diff --git a/deployments/hyperevm/SettersGovernor.json b/deployments/hyperevm/SettersGovernor.json index 82ecbc8..ba43640 100644 --- a/deployments/hyperevm/SettersGovernor.json +++ b/deployments/hyperevm/SettersGovernor.json @@ -1,5 +1,5 @@ { - "address": "0x01bf702c4409eb71c8c9dc9fe03403b3791862fb", + "address": "0xf51edb90c72f86c72fdf8cc20557764abb44845e", "abi": [ { "inputs": [], @@ -57,6 +57,11 @@ "name": "InvalidParams", "type": "error" }, + { + "inputs": [], + "name": "InvalidPayee", + "type": "error" + }, { "inputs": [], "name": "InvalidRate", @@ -135,6 +140,11 @@ "name": "SafeERC20FailedOperation", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "inputs": [], "name": "ZeroAmount", @@ -285,6 +295,31 @@ "name": "OracleSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousTarget", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTarget", + "type": "uint256" + } + ], + "name": "OracleTargetUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -405,6 +440,19 @@ "name": "SurplusBufferRatioUpdated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -601,6 +649,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -712,8 +773,8 @@ ], "contractName": "SettersGovernor", "sourceName": "contracts/parallelizer/facets/SettersGovernor.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061417d8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506143348061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -759,6 +820,9 @@ "setCollateralManager(address,bool,(address[],bytes))": { "details": "Funds need to have been withdrawn from the eventual previous manager prior to this call" }, + "setSwapRouter(address)": { + "details": "The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold" + }, "updatePayees(address[],uint256[],bool)": { "params": { "_payees": "The new payee addresses", @@ -782,9 +846,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3353000", - "executionCost": "3729", - "totalCost": "3356729" + "codeDepositCost": "3440800", + "executionCost": "3842", + "totalCost": "3444642" }, "external": { "addCollateral(address)": "infinite", @@ -795,6 +859,7 @@ "setAccessManager(address)": "infinite", "setCollateralManager(address,bool,(address[],bytes))": "infinite", "setOracle(address,bytes)": "infinite", + "setSwapRouter(address)": "infinite", "setWhitelistStatus(address,uint8,bytes)": "infinite", "toggleTrusted(address,uint8)": "infinite", "updateOracle(address)": "infinite", @@ -804,12 +869,17 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xd4d195b62841c28dd5f248d09e682c3c81bda24b471cd8a5d8efe498519ea50d\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n}\\n\",\"keccak256\":\"0x3d0d0351ef8f06a401c421d2f76b4227e4819935583ad29f44fc6dc59f5ea021\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x9e41915e7fb03ef3b054f7ce0b7ab297e3b8f5c05ab1e7ebe072e22f11b22362\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousTarget\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTarget\",\"type\":\"uint256\"}],\"name\":\"OracleTargetUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"setSwapRouter(address)\":{\"details\":\"The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"events\":{\"OracleTargetUpdated(address,uint256,uint256)\":{\"notice\":\"Emitted when a MAX target price is ratcheted up by `updateOracle`\"}},\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setSwapRouter(address)\":{\"notice\":\"Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setSwapRouter(address swapRouter) external restricted {\\n LibSetters.setSwapRouter(swapRouter);\\n }\\n}\\n\",\"keccak256\":\"0x7c64a27bfb326989b6fdc21b3982ef5ce95aa2a576a4edc6d8334a8820f3b8fb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n event SwapRouterUpdated(address indexed swapRouter);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `setSwapRouter`\\n function setSwapRouter(address swapRouter) internal {\\n if (swapRouter == address(0)) revert ZeroAddress();\\n s.transmuterStorage().swapRouter = swapRouter;\\n emit SwapRouterUpdated(swapRouter);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n // The Parallelizer holds the income being distributed, so a share allocated to itself is handed\\n // back to `release` as fresh income on the next call. `address(0)` stays valid: `LibSurplus`\\n // treats it as the sentinel for burning that share.\\n if (_payee == address(this)) revert InvalidPayee();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x45ed1863aec8d20f3659d2b0ea657b629b5c33b71f895ae6775ea72156203197\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null }, "userdoc": { + "events": { + "OracleTargetUpdated(address,uint256,uint256)": { + "notice": "Emitted when a MAX target price is ratcheted up by `updateOracle`" + } + }, "kind": "user", "methods": { "addCollateral(address)": { @@ -836,6 +906,9 @@ "setOracle(address,bytes)": { "notice": "Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations" }, + "setSwapRouter(address)": { + "notice": "Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to" + }, "setWhitelistStatus(address,uint8,bytes)": { "notice": "Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist" }, @@ -859,13 +932,13 @@ }, "argsData": "0x", "transaction": { - "nonce": "0xbc", - "hash": "0xdab8ea29e3981c65356c58547d6153dfb3ec8768e33bc35427baea7e2f976a55", + "nonce": "0xd8", + "hash": "0xeecd64b53964d88a7ee032b78061347ed04e6bebcfae4778a3ee3766f2fb0261", "origin": "0x66ccec236bbce5f1bbd1b2fc0a4014e57a55ad02" }, "receipt": { - "blockHash": "0x28e60a6b9469eacc7a9397f0b537b53a9ca4b3a6ece554aa2f4128ef0b804898", - "blockNumber": "0x2765c43", - "transactionIndex": "0x4" + "blockHash": "0xe98ba7e75174559b9bbfe42934ecfea5947e2b221247a09fa3cef3e44041b73b", + "blockNumber": "0x2e59ff0", + "transactionIndex": "0x3" } } \ No newline at end of file diff --git a/deployments/mainnet/GenericRebalancer_USDp.json b/deployments/mainnet/GenericRebalancer_USDp.json new file mode 100644 index 0000000..bcfd86f --- /dev/null +++ b/deployments/mainnet/GenericRebalancer_USDp.json @@ -0,0 +1,1228 @@ +{ + "address": "0xa2961be0e3b928288db2d9d80d125c68f0092289", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialTokenTransferAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "initialSwapRouter", + "type": "address" + }, + { + "internalType": "contract ITokenP", + "name": "definitivetokenP", + "type": "address" + }, + { + "internalType": "contract IParallelizer", + "name": "definitiveParallelizer", + "type": "address" + }, + { + "internalType": "address", + "name": "initialAuthority", + "type": "address" + }, + { + "internalType": "contract IERC3156FlashLender", + "name": "definitiveFlashloan", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AccessManagedInvalidAuthority", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "name": "AccessManagedRequiredDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessManagedUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidParam", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrusted", + "type": "error" + }, + { + "inputs": [], + "name": "NotTrustedOrGuardian", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SwapError", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "AllowanceReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "TokenTransferAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "trusted", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "TrustedToggled", + "type": "event" + }, + { + "inputs": [], + "name": "CALLBACK_SUCCESS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "addBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "budget", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "computeRebalanceAmount", + "outputs": [ + { + "internalType": "uint8", + "name": "increase", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "flashloan", + "outputs": [ + { + "internalType": "contract IERC3156FlashLender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "scale", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "harvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isTrusted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onFlashLoan", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "parallelizer", + "outputs": [ + { + "internalType": "contract IParallelizer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountToRecover", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "removeBudget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "resetAllowance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "newMaxSlippage", + "type": "uint64" + } + ], + "name": "setMaxSlippage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSwapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + } + ], + "name": "setTargetExposure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTokenTransferAddress", + "type": "address" + } + ], + "name": "setTokenTransferAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "name": "setYieldBearingAssetData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "swapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trusted", + "type": "address" + } + ], + "name": "toggleTrusted", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokenP", + "outputs": [ + { + "internalType": "contract ITokenP", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenTransferAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "yieldBearingAsset", + "type": "address" + } + ], + "name": "updateLimitExposuresYieldAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "yieldBearingData", + "outputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint64", + "name": "targetExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minExposure", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "overrideExposures", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxSlippage", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contractName": "GenericRebalancer", + "sourceName": "contracts/helpers/GenericRebalancer.sol", + "bytecode": "0x60e060405234801561000f575f5ffd5b5060405161327238038061327283398101604081905261002e9161018c565b84868386868261003d81610122565b506001600160a01b0391821660a0528116608052600380549482166001600160a01b03199586161790556004805493821693909416929092179092558216905061009a5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0381811660c081905260a05160405163095ea7b360e01b815260048101929092525f1960248301529091169063095ea7b3906044016020604051808303815f875af11580156100f2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610116919061020f565b50505050505050610235565b5f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6001600160a01b0381168114610189575f5ffd5b50565b5f5f5f5f5f5f60c087890312156101a1575f5ffd5b86516101ac81610175565b60208801519096506101bd81610175565b60408801519095506101ce81610175565b60608801519094506101df81610175565b60808801519093506101f081610175565b60a088015190925061020181610175565b809150509295509295509295565b5f6020828403121561021f575f5ffd5b8151801515811461022e575f5ffd5b9392505050565b60805160a05160c051612f956102dd5f395f818161021a015281816106110152611f5a01525f81816101d6015281816105d9015281816107390152818161085901528181610e83015281816117710152611f8a01525f818161027501528181610779015281816108070152818161088f0152818161107901528181611720015281816117a5015281816118cc0152818161195d01528181611bd90152611cfb0152612f955ff3fe608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101a5575f3560e01c80638237e538116100e8578063c19bf50e11610093578063c9c666741161006e578063c9c66674146104ac578063d2d0ec10146104cb578063e234b903146104de578063edf0ef03146104f1575f5ffd5b8063c19bf50e146103d2578063c31c9c07146103e5578063c5e6d5ea146103f8575f5ffd5b80639ae78486116100c35780639ae784861461039c578063b51609b4146103af578063bf7e214f146103c2575f5ffd5b80638237e538146103225780638fb360371461034957806396d648791461036a575f5ffd5b806335b37d1a11610153578063641bd5031161012e578063641bd503146102bd5780637a9e5e4b146102e95780637ee84349146102fc5780638195001d1461030f575f5ffd5b806335b37d1a1461027057806341273657146102975780635a7cb38f146102aa575f5ffd5b80631b89b61a116101835780631b89b61a14610215578063212c8fb11461023c57806323e30c8b1461024f575f5ffd5b80630db99fb0146101a9578063136c9b7a146101be5780631978a5ed146101d1575b5f5ffd5b6101bc6101b736600461273e565b610504565b005b6101bc6101cc3660046127cf565b610559565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc61024a366004612806565b61059f565b61026261025d36600461286e565b610605565b60405190815260200161020c565b6101f87f000000000000000000000000000000000000000000000000000000000000000081565b6101bc6102a53660046128e5565b6109d0565b6004546101f8906001600160a01b031681565b6102d06102cb3660046128e5565b610a10565b6040805160ff909316835260208301919091520161020c565b6101bc6102f73660046128e5565b610aa9565b6101bc61030a3660046128e5565b610b36565b6101bc61031d3660046128e5565b610beb565b6102627f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd981565b610351610c36565b6040516001600160e01b0319909116815260200161020c565b61038c6103783660046128e5565b60026020525f908152604090205460ff1681565b604051901515815260200161020c565b6101bc6103aa3660046127cf565b610c71565b6101bc6103bd366004612900565b610d27565b5f546001600160a01b03166101f8565b6101bc6103e036600461293f565b610dc2565b6003546101f8906001600160a01b031681565b6104636104063660046128e5565b600160208190525f918252604090912080549101546001600160a01b0382169167ffffffffffffffff600160a01b90910481169180821691680100000000000000008204811691600160801b8104821691600160c01b9091041686565b604080516001600160a01b03909716875267ffffffffffffffff9586166020880152938516938601939093529083166060850152821660808401521660a082015260c00161020c565b6102626104ba3660046128e5565b60056020525f908152604090205481565b6101bc6104d9366004612806565b610e52565b6101bc6104ec3660046128e5565b610eaa565b6101bc6104ff36600461296b565b610eea565b33610510815f36611121565b819061053f5760405162d1953b60e31b81526001600160a01b0390911660048201526024015b60405180910390fd5b5061054f8888888888888861121f565b5050505050505050565b33610565815f36611121565b819061058f5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061059a83836114b1565b505050565b6001600160a01b0381165f90815260056020526040812080548492906105c69084906129d7565b9091555061060190506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611533565b5050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061064757506001600160a01b0387163014155b1561066557604051636115324760e11b815260040160405180910390fd5b5f80808060608180808061067b8b8d018d612aae565b959e50939c509a50919850919650909250905060018890036106a2578193508092506106a9565b8192508093505b50506040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107139190612b41565b6040516301db50ff60e51b8152600481018f90525f602482018190526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116604484015285811660648401523060848401524260a4840152929350917f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156107bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e39190612b41565b90506107ef8d8f6129d7565b9d506107ff888486848a8a61159a565b905061082c847f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b815260048101829052602481018890526001600160a01b0385811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301525f917f000000000000000000000000000000000000000000000000000000000000000090911690633b6a1fe09060c4016020604051808303815f875af11580156108d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108fb9190612b41565b90506109078484611691565b61091190826129d7565b9050808f111561095957808f6109279190612b58565b6001600160a01b038b165f908152600560205260408120805490919061094e908490612b58565b909155506109989050565b8e8111156109985761096b8f82612b58565b6001600160a01b038b165f90815260056020526040812080549091906109929084906129d7565b90915550505b7f439148f0bbc682ca079e46d6e2c2f0c1e3b820f1a291b069d8882abf8cf18dd99a50505050505050505050505b9695505050505050565b336109dc815f36611121565b8190610a065760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506106018261181a565b6001600160a01b038181165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a0830152908190610aa09084906118a5565b91509150915091565b5f5433906001600160a01b03168114610adf5760405162d1953b60e31b81526001600160a01b0382166004820152602401610536565b816001600160a01b03163b5f03610b2d576040517fc2f31e5e0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610536565b61060182611b3e565b33610b42815f36611121565b8190610b6c5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b506001600160a01b0382165f8181526002602090815260409182902054825193845260ff161515908301527f7628ea5f6112a16b36a8239aa208395a8e8f221688cfb3a5461faffb9700abcd910160405180910390a1506001600160a01b03165f908152600260205260409020805460ff19811660ff90911615179055565b6001600160a01b0381165f90815260016020819052604090912090810154600160801b900467ffffffffffffffff16600203610601578054610601906001600160a01b031682611b9e565b5f8054600160a01b900460ff16610c4c57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b335f9081526002602052604090205460ff16158015610c985750610c96335f36611121565b155b15610ccf576040517f0dcc030f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b039091165f908152600160205260409020805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b33610d33815f36611121565b8190610d5d5760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50604080516001600160a01b0386811682526020820186905284168183015290517fb197f0a554c4d7840105e6ae65f0e275e9e8605a969dffa8caa7f1f118a2e1f59181900360600190a1610dbc6001600160a01b0385168385611dfc565b50505050565b33610dce815f36611121565b8190610df85760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b50610e0d6001600160a01b038416835f611e2d565b816001600160a01b0316836001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a3505050565b335f9081526005602052604081208054849290610e70908490612b58565b9091555061060190506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284611dfc565b33610eb6815f36611121565b8190610ee05760405162d1953b60e31b81526001600160a01b039091166004820152602401610536565b5061060182611ed5565b335f9081526002602052604090205460ff16610f1957604051636115324760e11b815260040160405180910390fd5b633b9aca00831115610f3e57604051633494a40d60e21b815260040160405180910390fd5b610f4784610beb565b6001600160a01b038481165f908152600160208181526040808420815160c08101835281549687168152600160a01b90960467ffffffffffffffff90811693870193909352909201548082169285019290925268010000000000000000820481166060850152600160801b820481166080850152600160c01b9091041660a083015280610fd487846118a5565b9092509050633b9aca00610fe88783612b6b565b610ff29190612b82565b9050805f0361102d576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8061103b86880188612ba1565b6040517f1cb44dfc0000000000000000000000000000000000000000000000000000000081526001600160a01b038c811660048301529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690631cb44dfc906024015f604051808303815f87803b1580156110bc575f5ffd5b505af19250505080156110cd575060015b5061111683858b885f0151633b9aca008a60a00151633b9aca006110f19190612bec565b6111059067ffffffffffffffff168a612b6b565b61110f9190612b82565b8787611f58565b505050505050505050565b5f5f5f6111556111385f546001600160a01b031690565b873061114760045f8a8c612c0c565b61115091612c33565b612035565b91509150816112115763ffffffff811615611207575f805460ff60a01b198116600160a01b179091556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906394c7d7ee906111c890899089908990600401612c69565b5f604051808303815f87803b1580156111df575f5ffd5b505af11580156111f1573d5f5f3e3d5ffd5b50505f805460ff60a01b19169055506112119050565b5f92505050611218565b6001925050505b9392505050565b6001600160a01b038088165f9081526001602052604090208054909116801580159061125d5750876001600160a01b0316816001600160a01b031614155b156112b7576112766001600160a01b0382168a5f611e2d565b886001600160a01b0316816001600160a01b03167feac2d1aecf4950a2d87b2506fdbcfb534689cdefb9a94d19360f799088fcb3d760405160405180910390a35b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038916178255633b9aca0067ffffffffffffffff88161061130b57604051633494a40d60e21b815260040160405180910390fd5b633b9aca008367ffffffffffffffff161061133957604051633494a40d60e21b815260040160405180910390fd5b815467ffffffffffffffff808916600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff90921691909117835560018084018054868416600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff948916600160801b8102959095166fffffffffffffffffffffffffffffffff909216919091171790550361146a57633b9aca008567ffffffffffffffff161015806113ff57508467ffffffffffffffff168667ffffffffffffffff1610155b1561141d57604051633494a40d60e21b815260040160405180910390fd5b60018201805467ffffffffffffffff88811668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921690881617179055611116565b6001820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff167002000000000000000000000000000000001790556111168883611b9e565b633b9aca008167ffffffffffffffff16106114df57604051633494a40d60e21b815260040160405180910390fd5b6001600160a01b039091165f90815260016020819052604090912001805467ffffffffffffffff909216600160c01b0277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040516001600160a01b038481166024830152838116604483015260648201839052610dbc9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506120e0565b5f60018360018111156115af576115af612ca7565b036115c7576115c086868685612165565b90506109c6565b5f8360018111156115da576115da612ca7565b036109c6576115eb87878787612353565b979650505050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611643573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190612b41565b905081811015610dbc57610dbc83611680835f19612b58565b6001600160a01b038716919061248c565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156116d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116fb9190612b41565b905082811161170d575f915050611814565b5f6117188483612b58565b9050611745857f0000000000000000000000000000000000000000000000000000000000000000836115f6565b6040516301db50ff60e51b8152600481018290525f60248201526001600160a01b0386811660448301527f0000000000000000000000000000000000000000000000000000000000000000811660648301523060848301524260a48301527f00000000000000000000000000000000000000000000000000000000000000001690633b6a1fe09060c4016020604051808303815f875af11580156117eb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180f9190612b41565b925050505b92915050565b806001600160a01b0381166118425760405163d92e233d60e01b815260040160405180910390fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df906020015b60405180910390a15050565b604051634a71aecf60e11b81526001600160a01b0383811660048301525f918291829182917f000000000000000000000000000000000000000000000000000000000000000016906394e35d9e906024016040805180830381865afa158015611910573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119349190612cbb565b8651604051634a71aecf60e11b81526001600160a01b0391821660048201529294509092505f917f0000000000000000000000000000000000000000000000000000000000000000909116906394e35d9e906024016040805180830381865afa1580156119a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c79190612cbb565b5090505f82876020015167ffffffffffffffff166119e59190612b6b565b9050806119f685633b9aca00612b6b565b1115611a9157611a0a633b9aca0082612b82565b611a149085612b58565b94505f83886040015167ffffffffffffffff16611a319190612b6b565b905080611a4284633b9aca00612b6b565b1115611a50575f9550611a8b565b80611a5b87856129d7565b611a6990633b9aca00612b6b565b1115611a8b5782611a7e633b9aca0083612b82565b611a889190612b58565b95505b50611b33565b6001955083611aa4633b9aca0083612b82565b611aae9190612b58565b94505f83886060015167ffffffffffffffff16611acb9190612b6b565b905080611adc84633b9aca00612b6b565b1015611aea575f9550611b31565b611af886633b9aca00612b6b565b611b0290826129d7565b611b1084633b9aca00612b6b565b1015611b3157611b24633b9aca0082612b82565b611b2e9084612b58565b95505b505b505050509250929050565b5f805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9060200160405180910390a150565b6040517fb85780bc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063b85780bc906024015f60405180830381865afa158015611c1f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611c469190810190612d78565b50805190915060018111611c725760018301805467ffffffffffffffff1916633b9aca00179055611cc0565b81611c7e600283612b58565b81518110611c8e57611c8e612e35565b6020026020010151836001015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6040517f847da7be0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526060917f00000000000000000000000000000000000000000000000000000000000000009091169063847da7be906024015f60405180830381865afa158015611d41573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d689190810190612d78565b5080519250905060018211611da6576001840180547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169055611df5565b80611db2600284612b58565b81518110611dc257611dc2612e35565b60200260200101518460010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5050505050565b6040516001600160a01b0383811660248301526044820183905261059a91859182169063a9059cbb90606401611568565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611e978482612513565b610dbc576040516001600160a01b0384811660248301525f6044830152611ecb91869182169063095ea7b390606401611568565b610dbc84826120e0565b806001600160a01b038116611efd5760405163d92e233d60e01b815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527ffd238617dbf7bc2e2e9c11b00a61a76432989bf0d6ca3a5aa34381a8752db40390602001611899565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635cffe9de307f00000000000000000000000000000000000000000000000000000000000000008a338b8b8b8b8b8b604051602001611fc79796959493929190612e77565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611ff59493929190612ef4565b6020604051808303815f875af1158015612011573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054f9190612f2a565b6040516001600160a01b038085166024830152831660448201526001600160e01b0319821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156120d6575f516020805191945081901c150291505b5094509492505050565b5f5f60205f8451602086015f885af1806120ff576040513d5f823e3d81fd5b50505f513d91508115612116578060011415612123565b6001600160a01b0384163b155b15610dbc576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610536565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156121ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121cf9190612b41565b6040805160018082528183019092529192505f91906020808301908036833701905050905086815f8151811061220757612207612e35565b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092525f91816020015b606081526020019060019003908161223657905050905084815f8151811061226057612260612e35565b60209081029190910101526040805160018082528183019092525f9181602001602082028036833701905050905086815f815181106122a1576122a1612e35565b6020026020010181815250506122b8838383612558565b6004546122d2906001600160a01b038b811691165f611e2d565b6040516370a0823160e01b815230600482015284906001600160a01b038a16906370a0823190602401602060405180830381865afa158015612316573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233a9190612b41565b6123449190612b58565b9450505050505b949350505050565b5f846001036123f5576123678484846115f6565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b03841690636e553f65906044016020604051808303815f875af11580156123ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123ee9190612b41565b905061234b565b6040517fba08765200000000000000000000000000000000000000000000000000000000815260048101839052306024820181905260448201526001600160a01b0385169063ba087652906064016020604051808303815f875af115801561245f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124839190612b41565b95945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156124d9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124fd9190612b41565b9050610dbc848461250e85856129d7565b611e2d565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156109c65750811561254457806001146109c6565b50505050506001600160a01b03163b151590565b82515f5b81811015611df5576125b585828151811061257957612579612e35565b602002602001015160045f9054906101000a90046001600160a01b03168584815181106125a8576125a8612e35565b60200260200101516125df565b6125d78482815181106125ca576125ca612e35565b6020026020010151612668565b60010161255c565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561262c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126509190612b41565b905081811015610dbc57610dbc836116808385612b58565b6003546040515f9182916001600160a01b0390911690612689908590612f49565b5f604051808303815f865af19150503d805f81146126c2576040519150601f19603f3d011682016040523d82523d5f602084013e6126c7565b606091505b50915091508161059a578051156126e057805181602001fd5b6040517f7c3eb9ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114612726575f5ffd5b50565b67ffffffffffffffff81168114612726575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612754575f5ffd5b873561275f81612712565b9650602088013561276f81612712565b9550604088013561277f81612729565b9450606088013561278f81612729565b9350608088013561279f81612729565b925060a08801356127af81612729565b915060c08801356127bf81612729565b8091505092959891949750929550565b5f5f604083850312156127e0575f5ffd5b82356127eb81612712565b915060208301356127fb81612729565b809150509250929050565b5f5f60408385031215612817575f5ffd5b8235915060208301356127fb81612712565b5f5f83601f840112612839575f5ffd5b50813567ffffffffffffffff811115612850575f5ffd5b602083019150836020828501011115612867575f5ffd5b9250929050565b5f5f5f5f5f5f60a08789031215612883575f5ffd5b863561288e81612712565b9550602087013561289e81612712565b94506040870135935060608701359250608087013567ffffffffffffffff8111156128c7575f5ffd5b6128d389828a01612829565b979a9699509497509295939492505050565b5f602082840312156128f5575f5ffd5b813561121881612712565b5f5f5f60608486031215612912575f5ffd5b833561291d81612712565b925060208401359150604084013561293481612712565b809150509250925092565b5f5f60408385031215612950575f5ffd5b823561295b81612712565b915060208301356127fb81612712565b5f5f5f5f6060858703121561297e575f5ffd5b843561298981612712565b935060208501359250604085013567ffffffffffffffff8111156129ab575f5ffd5b6129b787828801612829565b95989497509550505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611814576118146129c3565b8035600281106129f8575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a3a57612a3a6129fd565b604052919050565b5f82601f830112612a51575f5ffd5b813567ffffffffffffffff811115612a6b57612a6b6129fd565b612a7e601f8201601f1916602001612a11565b818152846020838601011115612a92575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612ac4575f5ffd5b8735612acf81612712565b9650602088013595506040880135612ae681612712565b94506060880135612af681612712565b935060808801359250612b0b60a089016129ea565b915060c088013567ffffffffffffffff811115612b26575f5ffd5b612b328a828b01612a42565b91505092959891949750929550565b5f60208284031215612b51575f5ffd5b5051919050565b81810381811115611814576118146129c3565b8082028115828204841417611814576118146129c3565b5f82612b9c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f5f60408385031215612bb2575f5ffd5b612bbb836129ea565b9150602083013567ffffffffffffffff811115612bd6575f5ffd5b612be285828601612a42565b9150509250929050565b67ffffffffffffffff8281168282160390811115611814576118146129c3565b5f5f85851115612c1a575f5ffd5b83861115612c26575f5ffd5b5050820193919092039150565b80356001600160e01b03198116906004841015612c62576001600160e01b0319808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b5f5f60408385031215612ccc575f5ffd5b505080516020909101519092909150565b5f67ffffffffffffffff821115612cf657612cf66129fd565b5060051b60200190565b5f82601f830112612d0f575f5ffd5b8151612d22612d1d82612cdd565b612a11565b8082825260208201915060208360051b860101925085831115612d43575f5ffd5b602085015b83811015612d6e5780518060070b8114612d60575f5ffd5b835260209283019201612d48565b5095945050505050565b5f5f60408385031215612d89575f5ffd5b825167ffffffffffffffff811115612d9f575f5ffd5b8301601f81018513612daf575f5ffd5b8051612dbd612d1d82612cdd565b8082825260208201915060208360051b850101925087831115612dde575f5ffd5b6020840193505b82841015612e09578351612df881612729565b825260209384019390910190612de5565b80955050505050602083015167ffffffffffffffff811115612e29575f5ffd5b612be285828601612d00565b634e487b7160e01b5f52603260045260245ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038816815260ff871660208201526001600160a01b03861660408201526001600160a01b03851660608201528360808201525f60028410612ecd57634e487b7160e01b5f52602160045260245ffd5b8360a083015260e060c0830152612ee760e0830184612e49565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f6109c66080830184612e49565b5f60208284031215612f3a575f5ffd5b81518015158114611218575f5ffd5b5f82518060208501845e5f92019182525091905056fea2646970667358221220cefba1e3f1df405c269a30b122d6d0bfe6d65336cca0bd03698306a6e447d4bc64736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": { + "10252": [ + { + "length": 32, + "start": 629 + }, + { + "length": 32, + "start": 1913 + }, + { + "length": 32, + "start": 2055 + }, + { + "length": 32, + "start": 2191 + }, + { + "length": 32, + "start": 4217 + }, + { + "length": 32, + "start": 5920 + }, + { + "length": 32, + "start": 6053 + }, + { + "length": 32, + "start": 6348 + }, + { + "length": 32, + "start": 6493 + }, + { + "length": 32, + "start": 7129 + }, + { + "length": 32, + "start": 7419 + } + ], + "10256": [ + { + "length": 32, + "start": 470 + }, + { + "length": 32, + "start": 1497 + }, + { + "length": 32, + "start": 1849 + }, + { + "length": 32, + "start": 2137 + }, + { + "length": 32, + "start": 3715 + }, + { + "length": 32, + "start": 6001 + }, + { + "length": 32, + "start": 8074 + } + ], + "11053": [ + { + "length": 32, + "start": 538 + }, + { + "length": 32, + "start": 1553 + }, + { + "length": 32, + "start": 8026 + } + ] + }, + "inputSourceName": "project/contracts/helpers/GenericRebalancer.sol", + "devdoc": { + "author": "Cooper Labs", + "custom:contact": "security@cooperlabs.xyz", + "details": "Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol", + "errors": { + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC-20 token failed." + } + ] + }, + "events": { + "AuthorityUpdated(address)": { + "details": "Authority that manages this contract was updated." + } + }, + "kind": "dev", + "methods": { + "addBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to add to the budget", + "receiver": "address of the receiver" + } + }, + "authority()": { + "details": "Returns the current authority." + }, + "computeRebalanceAmount(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + }, + "returns": { + "amount": "amount to be rebalanced", + "increase": "whether the exposure should be increased" + } + }, + "harvest(address,uint256,bytes)": { + "details": "This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers" + }, + "isConsumingScheduledOp()": { + "details": "Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls." + }, + "onFlashLoan(address,address,uint256,uint256,bytes)": { + "details": "A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back", + "params": { + "amount": "The amount of tokens lent.", + "data": "Arbitrary data structure, intended to contain user-defined parameters.", + "fee": "The additional amount of tokens to repay.", + "initiator": "The initiator of the loan.", + "token": "The loan currency." + }, + "returns": { + "_0": "The keccak256 hash of \"ERC3156FlashBorrower.onFlashLoan\"" + } + }, + "recoverERC20(address,uint256,address)": { + "params": { + "amountToRecover": "amount to recover", + "to": "address to send the recovered tokens", + "tokenAddress": "address of the token to recover" + } + }, + "removeBudget(uint256,address)": { + "params": { + "amount": "amount of tokenP to remove from the budget", + "receiver": "address of the receiver" + } + }, + "resetAllowance(address,address)": { + "details": "Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.", + "params": { + "spender": "address losing the allowance", + "token": "address of the token" + } + }, + "setAuthority(address)": { + "details": "Transfers control to a new authority. The caller must be the current authority." + }, + "setMaxSlippage(address,uint64)": { + "params": { + "newMaxSlippage": "new max allowed slippage" + } + }, + "setSwapRouter(address)": { + "params": { + "newSwapRouter": "address of the swap router" + } + }, + "setTargetExposure(address,uint64)": { + "params": { + "targetExposure": "target exposure to the yield bearing asset used", + "yieldBearingAsset": "address of the yield bearing asset" + } + }, + "setTokenTransferAddress(address)": { + "params": { + "newTokenTransferAddress": "address of the token transfer contract" + } + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "params": { + "asset": "address of the asset", + "maxExposure": "maximum exposure within the Parallelizer to the asset", + "minExposure": "minimum exposure within the Parallelizer to the asset", + "overrideExposures": "whether limit exposures should be overriden or read onchain through the Parallelizer", + "targetExposure": "target exposure to the yieldBearingAsset asset used", + "yieldBearingAsset": "address of the yieldBearingAsset" + } + }, + "toggleTrusted(address)": { + "params": { + "trusted": "address to toggle the trusted status" + } + }, + "updateLimitExposuresYieldAsset(address)": { + "params": { + "yieldBearingAsset": "address of the yield bearing asset" + } + } + }, + "title": "GenericRebalancer", + "version": 1 + }, + "evm": { + "gasEstimates": { + "creation": { + "codeDepositCost": "2436200", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "CALLBACK_SUCCESS()": "240", + "addBudget(uint256,address)": "infinite", + "authority()": "2407", + "budget(address)": "2554", + "computeRebalanceAmount(address)": "infinite", + "flashloan()": "infinite", + "harvest(address,uint256,bytes)": "infinite", + "isConsumingScheduledOp()": "2442", + "isTrusted(address)": "2612", + "onFlashLoan(address,address,uint256,uint256,bytes)": "infinite", + "parallelizer()": "infinite", + "recoverERC20(address,uint256,address)": "infinite", + "removeBudget(uint256,address)": "infinite", + "resetAllowance(address,address)": "infinite", + "setAuthority(address)": "30486", + "setMaxSlippage(address,uint64)": "infinite", + "setSwapRouter(address)": "infinite", + "setTargetExposure(address,uint64)": "infinite", + "setTokenTransferAddress(address)": "infinite", + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": "infinite", + "swapRouter()": "2392", + "toggleTrusted(address)": "infinite", + "tokenP()": "infinite", + "tokenTransferAddress()": "2415", + "updateLimitExposuresYieldAsset(address)": "infinite", + "yieldBearingData(address)": "5001" + }, + "internal": { + "_adjustYieldExposure(uint256,uint8,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_recoverResidualInput(address,uint256)": "infinite", + "_swapToTokenOut(uint256,address,address,uint256,enum SwapType,bytes memory)": "infinite", + "_swapToTokenOutSwap(address,address,uint256,bytes memory)": "infinite", + "_swapToTokenOutVault(uint256,address,address,uint256)": "infinite" + } + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialTokenTransferAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialSwapRouter\",\"type\":\"address\"},{\"internalType\":\"contract ITokenP\",\"name\":\"definitivetokenP\",\"type\":\"address\"},{\"internalType\":\"contract IParallelizer\",\"name\":\"definitiveParallelizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialAuthority\",\"type\":\"address\"},{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"definitiveFlashloan\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AccessManagedInvalidAuthority\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"delay\",\"type\":\"uint32\"}],\"name\":\"AccessManagedRequiredDelay\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrustedOrGuardian\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SwapError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"AllowanceReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"TokenTransferAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CALLBACK_SUCCESS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"addBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"budget\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"computeRebalanceAmount\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"increase\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flashloan\",\"outputs\":[{\"internalType\":\"contract IERC3156FlashLender\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"harvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onFlashLoan\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parallelizer\",\"outputs\":[{\"internalType\":\"contract IParallelizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountToRecover\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"removeBudget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"resetAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"newMaxSlippage\",\"type\":\"uint64\"}],\"name\":\"setMaxSlippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSwapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"}],\"name\":\"setTargetExposure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTokenTransferAddress\",\"type\":\"address\"}],\"name\":\"setTokenTransferAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"name\":\"setYieldBearingAssetData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trusted\",\"type\":\"address\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenTransferAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"yieldBearingAsset\",\"type\":\"address\"}],\"name\":\"updateLimitExposuresYieldAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"yieldBearingData\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"targetExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minExposure\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"overrideExposures\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSlippage\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"Generic contract for trusted callers to adjust the reserves of Angle ParallelizerThis contract is an authorized fork of Angle's GenericHarvester contract, substantially modified: https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"AuthorityUpdated(address)\":{\"details\":\"Authority that manages this contract was updated.\"}},\"kind\":\"dev\",\"methods\":{\"addBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to add to the budget\",\"receiver\":\"address of the receiver\"}},\"authority()\":{\"details\":\"Returns the current authority.\"},\"computeRebalanceAmount(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"},\"returns\":{\"amount\":\"amount to be rebalanced\",\"increase\":\"whether the exposure should be increased\"}},\"harvest(address,uint256,bytes)\":{\"details\":\"This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up some yieldBearingAsset that can then be used for people looking to burn deposit tokensDue to potential transaction fees within the Parallelizer, this function doesn't exactly bring `yieldBearingAsset` to the target exposurescale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest, it is used to lower the amount of the asset to harvest for example to have a lower slippageRestricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the collateral oracle, neither of which can be safely exposed to arbitrary callers\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"onFlashLoan(address,address,uint256,uint256,bytes)\":{\"details\":\"A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any shortfall between the principal and the tokenP the rebalance minted back\",\"params\":{\"amount\":\"The amount of tokens lent.\",\"data\":\"Arbitrary data structure, intended to contain user-defined parameters.\",\"fee\":\"The additional amount of tokens to repay.\",\"initiator\":\"The initiator of the loan.\",\"token\":\"The loan currency.\"},\"returns\":{\"_0\":\"The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\"}},\"recoverERC20(address,uint256,address)\":{\"params\":{\"amountToRecover\":\"amount to recover\",\"to\":\"address to send the recovered tokens\",\"tokenAddress\":\"address of the token to recover\"}},\"removeBudget(uint256,address)\":{\"params\":{\"amount\":\"amount of tokenP to remove from the budget\",\"receiver\":\"address of the receiver\"}},\"resetAllowance(address,address)\":{\"details\":\"Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing asset's configuration revokes the approvals it created, but this covers a spender that became untrusted for any other reason.\",\"params\":{\"spender\":\"address losing the allowance\",\"token\":\"address of the token\"}},\"setAuthority(address)\":{\"details\":\"Transfers control to a new authority. The caller must be the current authority.\"},\"setMaxSlippage(address,uint64)\":{\"params\":{\"newMaxSlippage\":\"new max allowed slippage\"}},\"setSwapRouter(address)\":{\"params\":{\"newSwapRouter\":\"address of the swap router\"}},\"setTargetExposure(address,uint64)\":{\"params\":{\"targetExposure\":\"target exposure to the yield bearing asset used\",\"yieldBearingAsset\":\"address of the yield bearing asset\"}},\"setTokenTransferAddress(address)\":{\"params\":{\"newTokenTransferAddress\":\"address of the token transfer contract\"}},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"params\":{\"asset\":\"address of the asset\",\"maxExposure\":\"maximum exposure within the Parallelizer to the asset\",\"minExposure\":\"minimum exposure within the Parallelizer to the asset\",\"overrideExposures\":\"whether limit exposures should be overriden or read onchain through the Parallelizer\",\"targetExposure\":\"target exposure to the yieldBearingAsset asset used\",\"yieldBearingAsset\":\"address of the yieldBearingAsset\"}},\"toggleTrusted(address)\":{\"params\":{\"trusted\":\"address to toggle the trusted status\"}},\"updateLimitExposuresYieldAsset(address)\":{\"params\":{\"yieldBearingAsset\":\"address of the yield bearing asset\"}}},\"title\":\"GenericRebalancer\",\"version\":1},\"userdoc\":{\"events\":{\"SwapRouterUpdated(address)\":{\"notice\":\"Event emitted when the swap router is updated\"},\"TokenTransferAddressUpdated(address)\":{\"notice\":\"Event emitted when the token proxy is updated\"}},\"kind\":\"user\",\"methods\":{\"addBudget(uint256,address)\":{\"notice\":\"Add budget to be spent by the receiver during the flashloan\"},\"budget(address)\":{\"notice\":\"Budget of tokenP available for each users\"},\"computeRebalanceAmount(address)\":{\"notice\":\"Compute the amount needed to rebalance the Parallelizer\"},\"flashloan()\":{\"notice\":\"Parallel stablecoin flashloan contract\"},\"harvest(address,uint256,bytes)\":{\"notice\":\"Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset\"},\"isTrusted(address)\":{\"notice\":\"trusted addresses that can update target exposure and do others non critical operations\"},\"parallelizer()\":{\"notice\":\"Reference to the `parallelizer` implementation this contract aims at rebalancing\"},\"recoverERC20(address,uint256,address)\":{\"notice\":\"Recover ERC20 tokens\"},\"removeBudget(uint256,address)\":{\"notice\":\"Remove budget from the owner and send it to the receiver\"},\"resetAllowance(address,address)\":{\"notice\":\"Set an allowance this contract granted back to zero\"},\"setMaxSlippage(address,uint64)\":{\"notice\":\"Set the max allowed slippage\"},\"setSwapRouter(address)\":{\"notice\":\"Set the swap router\"},\"setTargetExposure(address,uint64)\":{\"notice\":\"Set the target exposure of a yield bearing asset\"},\"setTokenTransferAddress(address)\":{\"notice\":\"Set the token transfer address\"},\"setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)\":{\"notice\":\"Set the yieldBearingAsset data\"},\"swapRouter()\":{\"notice\":\"address of the router/aggregator\"},\"toggleTrusted(address)\":{\"notice\":\"Toggle the trusted status of an address\"},\"tokenP()\":{\"notice\":\"TokenP handled by the `parallelizer` of interest\"},\"tokenTransferAddress()\":{\"notice\":\"address to approve to transfer tokens to\"},\"updateLimitExposuresYieldAsset(address)\":{\"notice\":\"Set the limit exposures to the asset linked to the yield bearing asset\"},\"yieldBearingData(address)\":{\"notice\":\"Data associated to a yield bearing asset\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/helpers/GenericRebalancer.sol\":\"GenericRebalancer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManaged.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManaged {\\n /**\\n * @dev Authority that manages this contract was updated.\\n */\\n event AuthorityUpdated(address authority);\\n\\n error AccessManagedUnauthorized(address caller);\\n error AccessManagedRequiredDelay(address caller, uint32 delay);\\n error AccessManagedInvalidAuthority(address authority);\\n\\n /**\\n * @dev Returns the current authority.\\n */\\n function authority() external view returns (address);\\n\\n /**\\n * @dev Transfers control to a new authority. The caller must be the current authority.\\n */\\n function setAuthority(address) external;\\n\\n /**\\n * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n * attacker controlled calls.\\n */\\n function isConsumingScheduledOp() external view returns (bytes4);\\n}\\n\",\"keccak256\":\"0x1121e070554cffc6d536f658332a1a3d65fb2ea5573cd774f4ecbd02a2fcf4b7\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashBorrower.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashBorrower.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashBorrower, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashBorrower {\\n /**\\n * @dev Receive a flash loan.\\n * @param initiator The initiator of the loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param fee The additional amount of tokens to repay.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n * @return The keccak256 hash of \\\"ERC3156FlashBorrower.onFlashLoan\\\"\\n */\\n function onFlashLoan(\\n address initiator,\\n address token,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n ) external returns (bytes32);\\n}\\n\",\"keccak256\":\"0x4e4b982b56b50290dd1dcaa2fef1178b1574dfc7c0f0a8ef9cb68a207d72582e\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC3156FlashLender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashLender.sol)\\n\\npragma solidity >=0.5.0;\\n\\nimport {IERC3156FlashBorrower} from \\\"./IERC3156FlashBorrower.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC-3156 FlashLender, as defined in\\n * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].\\n */\\ninterface IERC3156FlashLender {\\n /**\\n * @dev The amount of currency available to be lended.\\n * @param token The loan currency.\\n * @return The amount of `token` that can be borrowed.\\n */\\n function maxFlashLoan(address token) external view returns (uint256);\\n\\n /**\\n * @dev The fee to be charged for a given loan.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @return The amount of `token` to be charged for the loan, on top of the returned principal.\\n */\\n function flashFee(address token, uint256 amount) external view returns (uint256);\\n\\n /**\\n * @dev Initiate a flash loan.\\n * @param receiver The receiver of the tokens in the loan, and the receiver of the callback.\\n * @param token The loan currency.\\n * @param amount The amount of tokens lent.\\n * @param data Arbitrary data structure, intended to contain user-defined parameters.\\n */\\n function flashLoan(\\n IERC3156FlashBorrower receiver,\\n address token,\\n uint256 amount,\\n bytes calldata data\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x218d708e7d8df417db24a497727eefb7772e61c7cde3886fc42bbcb6aafa6947\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/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\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/helpers/BaseRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { AccessManaged } from \\\"../utils/AccessManaged.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport \\\"contracts/interfaces/IRebalancer.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nstruct YieldBearingParams {\\n // Address of the asset used to mint the yield bearing asset\\n address asset;\\n // Target exposure to the collateral yield bearing asset used\\n uint64 targetExposure;\\n // Maximum exposure within the Parallelizer to the deposit asset\\n uint64 maxExposure;\\n // Minimum exposure within the Parallelizer to the deposit asset\\n uint64 minExposure;\\n // Whether limit exposures should be overriden or read onchain through the Parallelizer\\n // This value should be 1 to override exposures or 2 if these shouldn't be overriden\\n uint64 overrideExposures;\\n // Maximum slippage when dealing with the Parallelizer, bounded below 1e9 so uint64 leaves the\\n // struct packed in two slots\\n uint64 maxSlippage;\\n}\\n\\n/// @title BaseRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Abstract contract for a rebalancer that aims at rebalancing a Parallelizer\\n/// @dev This contract is an authorized fork of Angle's BaseHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/BaseHarvester.sol\\nabstract contract BaseRebalancer is IRebalancer, AccessManaged {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrusted() {\\n if (!isTrusted[msg.sender]) revert NotTrusted();\\n _;\\n }\\n\\n /**\\n * @notice Checks whether the `msg.sender` is trusted or guardian to update\\n * target exposure and do others non critical operations\\n */\\n modifier onlyTrustedOrRestricted() {\\n if (!isTrusted[msg.sender] && !_checkCanCall(_msgSender(), _msgData())) {\\n revert NotTrustedOrGuardian();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VARIABLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reference to the `parallelizer` implementation this contract aims at rebalancing\\n IParallelizer public immutable parallelizer;\\n /// @notice TokenP handled by the `parallelizer` of interest\\n ITokenP public immutable tokenP;\\n /// @notice Data associated to a yield bearing asset\\n mapping(address => YieldBearingParams) public yieldBearingData;\\n /// @notice trusted addresses that can update target exposure and do others non critical operations\\n mapping(address => bool) public isTrusted;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EVENTS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n event Recovered(address token, uint256 amount, address to);\\n event TrustedToggled(address trusted, bool status);\\n event AllowanceReset(address indexed token, address indexed spender);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialAuthority,\\n ITokenP definitiveTokenP,\\n IParallelizer definitiveParallelizer\\n )\\n AccessManaged(initialAuthority)\\n {\\n tokenP = definitiveTokenP;\\n parallelizer = definitiveParallelizer;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n GUARDIAN FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the yieldBearingAsset data\\n * @param yieldBearingAsset address of the yieldBearingAsset\\n * @param asset address of the asset\\n * @param targetExposure target exposure to the yieldBearingAsset asset used\\n * @param minExposure minimum exposure within the Parallelizer to the asset\\n * @param maxExposure maximum exposure within the Parallelizer to the asset\\n * @param overrideExposures whether limit exposures should be overriden or read onchain through the Parallelizer\\n */\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external\\n restricted\\n {\\n _setYieldBearingAssetData(\\n yieldBearingAsset, asset, targetExposure, minExposure, maxExposure, overrideExposures, maxSlippage\\n );\\n }\\n\\n /**\\n * @notice Set the limit exposures to the asset linked to the yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n */\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) public virtual {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n if (yieldBearingInfo.overrideExposures == 2) {\\n _updateLimitExposuresYieldAsset(yieldBearingInfo.asset, yieldBearingInfo);\\n }\\n }\\n\\n /**\\n * @notice Set the max allowed slippage\\n * @param newMaxSlippage new max allowed slippage\\n */\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external restricted {\\n _setMaxSlippage(yieldBearingAsset, newMaxSlippage);\\n }\\n\\n /**\\n * @notice Toggle the trusted status of an address\\n * @param trusted address to toggle the trusted status\\n */\\n function toggleTrusted(address trusted) external restricted {\\n emit TrustedToggled(trusted, isTrusted[trusted]);\\n isTrusted[trusted] = !isTrusted[trusted];\\n }\\n\\n /**\\n * @notice Recover ERC20 tokens\\n * @param tokenAddress address of the token to recover\\n * @param amountToRecover amount to recover\\n * @param to address to send the recovered tokens\\n */\\n function recoverERC20(address tokenAddress, uint256 amountToRecover, address to) external restricted {\\n emit Recovered(tokenAddress, amountToRecover, to);\\n IERC20(tokenAddress).safeTransfer(to, amountToRecover);\\n }\\n\\n /**\\n * @notice Set an allowance this contract granted back to zero\\n * @param token address of the token\\n * @param spender address losing the allowance\\n * @dev Rebalancing grants unlimited allowances that are never reduced. Rotating a yield bearing\\n * asset's configuration revokes the approvals it created, but this covers a spender that became\\n * untrusted for any other reason.\\n */\\n function resetAllowance(address token, address spender) external restricted {\\n IERC20(token).forceApprove(spender, 0);\\n emit AllowanceReset(token, spender);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n TRUSTED FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the target exposure of a yield bearing asset\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @param targetExposure target exposure to the yield bearing asset used\\n */\\n function setTargetExposure(address yieldBearingAsset, uint64 targetExposure) external onlyTrustedOrRestricted {\\n yieldBearingData[yieldBearingAsset].targetExposure = targetExposure;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Compute the amount needed to rebalance the Parallelizer\\n * @param yieldBearingAsset address of the yield bearing asset\\n * @return increase whether the exposure should be increased\\n * @return amount amount to be rebalanced\\n */\\n function computeRebalanceAmount(address yieldBearingAsset) external view returns (uint8 increase, uint256 amount) {\\n return _computeRebalanceAmount(yieldBearingAsset, yieldBearingData[yieldBearingAsset]);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _computeRebalanceAmount(\\n address yieldBearingAsset,\\n YieldBearingParams memory yieldBearingInfo\\n )\\n internal\\n view\\n returns (uint8 increase, uint256 amount)\\n {\\n (uint256 stablecoinsFromYieldBearingAsset, uint256 stablecoinsIssued) =\\n parallelizer.getIssuedByCollateral(yieldBearingAsset);\\n (uint256 stablecoinsFromAsset,) = parallelizer.getIssuedByCollateral(yieldBearingInfo.asset);\\n uint256 targetExposureScaled = yieldBearingInfo.targetExposure * stablecoinsIssued;\\n if (stablecoinsFromYieldBearingAsset * 1e9 > targetExposureScaled) {\\n // Need to decrease exposure to yield bearing asset\\n amount = stablecoinsFromYieldBearingAsset - targetExposureScaled / 1e9;\\n uint256 maxValueScaled = yieldBearingInfo.maxExposure * stablecoinsIssued;\\n // These checks assume that there are no transaction fees on the stablecoin->collateral conversion and so\\n // it's still possible that exposure goes above the max exposure in some rare cases\\n if (stablecoinsFromAsset * 1e9 > maxValueScaled) {\\n amount = 0;\\n } else if ((stablecoinsFromAsset + amount) * 1e9 > maxValueScaled) {\\n amount = maxValueScaled / 1e9 - stablecoinsFromAsset;\\n }\\n } else {\\n // In this case, exposure after the operation might remain slightly below the targetExposure as less\\n // collateral may be obtained by burning stablecoins for the yield asset and unwrapping it\\n increase = 1;\\n amount = targetExposureScaled / 1e9 - stablecoinsFromYieldBearingAsset;\\n uint256 minValueScaled = yieldBearingInfo.minExposure * stablecoinsIssued;\\n if (stablecoinsFromAsset * 1e9 < minValueScaled) {\\n amount = 0;\\n } else if (stablecoinsFromAsset * 1e9 < minValueScaled + amount * 1e9) {\\n amount = stablecoinsFromAsset - minValueScaled / 1e9;\\n }\\n }\\n }\\n\\n function _setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address asset,\\n uint64 targetExposure,\\n uint64 minExposure,\\n uint64 maxExposure,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n internal\\n virtual\\n {\\n YieldBearingParams storage yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n address previousAsset = yieldBearingInfo.asset;\\n // Allowances are granted without expiry, so the outgoing asset would keep the yield bearing\\n // vault authorised over any of it later held here\\n if (previousAsset != address(0) && previousAsset != asset) {\\n IERC20(previousAsset).forceApprove(yieldBearingAsset, 0);\\n emit AllowanceReset(previousAsset, yieldBearingAsset);\\n _revokeAssetAllowances(yieldBearingAsset, previousAsset);\\n }\\n yieldBearingInfo.asset = asset;\\n if (targetExposure >= 1e9) revert InvalidParam();\\n if (maxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingInfo.targetExposure = targetExposure;\\n yieldBearingInfo.overrideExposures = overrideExposures;\\n yieldBearingInfo.maxSlippage = maxSlippage;\\n if (overrideExposures == 1) {\\n if (maxExposure >= 1e9 || minExposure >= maxExposure) revert InvalidParam();\\n yieldBearingInfo.maxExposure = maxExposure;\\n yieldBearingInfo.minExposure = minExposure;\\n } else {\\n yieldBearingInfo.overrideExposures = 2;\\n _updateLimitExposuresYieldAsset(asset, yieldBearingInfo);\\n }\\n }\\n\\n /// @notice Lets a rebalancer revoke the allowances it granted over an asset being rotated out\\n function _revokeAssetAllowances(address yieldBearingAsset, address previousAsset) internal virtual { }\\n\\n function _updateLimitExposuresYieldAsset(\\n address asset,\\n YieldBearingParams storage yieldBearingInfo\\n )\\n internal\\n virtual\\n {\\n uint64[] memory xFeeMint;\\n (xFeeMint,) = parallelizer.getCollateralMintFees(asset);\\n uint256 length = xFeeMint.length;\\n if (length <= 1) yieldBearingInfo.maxExposure = 1e9;\\n else yieldBearingInfo.maxExposure = xFeeMint[length - 2];\\n\\n uint64[] memory xFeeBurn;\\n (xFeeBurn,) = parallelizer.getCollateralBurnFees(asset);\\n length = xFeeBurn.length;\\n if (length <= 1) yieldBearingInfo.minExposure = 0;\\n else yieldBearingInfo.minExposure = xFeeBurn[length - 2];\\n }\\n\\n function _setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) internal virtual {\\n if (newMaxSlippage >= 1e9) revert InvalidParam();\\n yieldBearingData[yieldBearingAsset].maxSlippage = newMaxSlippage;\\n }\\n\\n function _scaleAmountBasedOnDecimals(\\n uint256 decimalsTokenIn,\\n uint256 decimalsTokenOut,\\n uint256 amountIn,\\n bool assetIn\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (decimalsTokenIn > decimalsTokenOut) {\\n if (assetIn) {\\n amountIn /= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n } else {\\n amountIn *= 10 ** (decimalsTokenIn - decimalsTokenOut);\\n }\\n } else if (decimalsTokenIn < decimalsTokenOut) {\\n if (assetIn) {\\n amountIn *= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n } else {\\n amountIn /= 10 ** (decimalsTokenOut - decimalsTokenIn);\\n }\\n }\\n return amountIn;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPER \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function _adjustAllowance(address token, address sender, uint256 amountIn) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), sender);\\n if (allowance < amountIn) IERC20(token).safeIncreaseAllowance(sender, type(uint256).max - allowance);\\n }\\n}\\n\",\"keccak256\":\"0x5d05479be1ac7d1dc738cb8fc2e539c82e88a2191dee278cc74fd647eed17ebc\",\"license\":\"GPL-3.0\"},\"project/contracts/helpers/GenericRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC3156FlashBorrower } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol\\\";\\nimport { IERC3156FlashLender } from \\\"@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol\\\";\\nimport { RouterSwapper } from \\\"@helpers/RouterSwapper.sol\\\";\\n\\nimport { IParallelizer } from \\\"contracts/interfaces/IParallelizer.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IERC4626 } from \\\"contracts/interfaces/external/IERC4626.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\nimport { BaseRebalancer, YieldBearingParams } from \\\"./BaseRebalancer.sol\\\";\\n\\nenum SwapType {\\n VAULT,\\n SWAP\\n}\\n\\n/// @title GenericRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Generic contract for trusted callers to adjust the reserves of Angle Parallelizer\\n/// @dev This contract is an authorized fork of Angle's GenericHarvester contract, substantially modified:\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/helpers/GenericHarvester.sol\\ncontract GenericRebalancer is BaseRebalancer, IERC3156FlashBorrower, RouterSwapper {\\n using SafeCast for uint256;\\n using SafeERC20 for IERC20;\\n\\n bytes32 public constant CALLBACK_SUCCESS = keccak256(\\\"ERC3156FlashBorrower.onFlashLoan\\\");\\n\\n /// @notice Parallel stablecoin flashloan contract\\n IERC3156FlashLender public immutable flashloan;\\n /// @notice Budget of tokenP available for each users\\n mapping(address => uint256) public budget;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INITIALIZATION \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n address initialTokenTransferAddress,\\n address initialSwapRouter,\\n ITokenP definitivetokenP,\\n IParallelizer definitiveParallelizer,\\n address initialAuthority,\\n IERC3156FlashLender definitiveFlashloan\\n )\\n RouterSwapper(initialSwapRouter, initialTokenTransferAddress)\\n BaseRebalancer(initialAuthority, definitivetokenP, definitiveParallelizer)\\n {\\n if (address(definitiveFlashloan) == address(0)) revert ZeroAddress();\\n flashloan = definitiveFlashloan;\\n\\n IERC20(tokenP).approve(address(definitiveFlashloan), type(uint256).max);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n BUDGET HANDLING\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Add budget to be spent by the receiver during the flashloan\\n * @param amount amount of tokenP to add to the budget\\n * @param receiver address of the receiver\\n */\\n function addBudget(uint256 amount, address receiver) public virtual {\\n budget[receiver] += amount;\\n\\n IERC20(tokenP).safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Remove budget from the owner and send it to the receiver\\n * @param amount amount of tokenP to remove from the budget\\n * @param receiver address of the receiver\\n */\\n function removeBudget(uint256 amount, address receiver) public virtual {\\n budget[msg.sender] -= amount; // Will revert if not enough funds\\n\\n IERC20(tokenP).safeTransfer(receiver, amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HARVEST\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure\\n /// to this yieldBearingAsset\\n /// @dev This transaction either reduces the exposure to `yieldBearingAsset` in the Parallelizer or frees up\\n /// some yieldBearingAsset that can then be used for people looking to burn deposit tokens\\n /// @dev Due to potential transaction fees within the Parallelizer, this function doesn't exactly bring\\n /// `yieldBearingAsset` to the target exposure\\n /// @dev scale is a number between 0 and 1e9 that represents the proportion of the tokenP to harvest,\\n /// it is used to lower the amount of the asset to harvest for example to have a lower slippage\\n /// @dev Restricted to trusted callers: the flow forwards caller-supplied router calldata and refreshes the\\n /// collateral oracle, neither of which can be safely exposed to arbitrary callers\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) public virtual onlyTrusted {\\n if (scale > 1e9) revert InvalidParam();\\n updateLimitExposuresYieldAsset(yieldBearingAsset);\\n YieldBearingParams memory yieldBearingInfo = yieldBearingData[yieldBearingAsset];\\n (uint8 increase, uint256 amount) = _computeRebalanceAmount(yieldBearingAsset, yieldBearingInfo);\\n amount = (amount * scale) / 1e9;\\n if (amount == 0) revert ZeroAmount();\\n (SwapType swapType, bytes memory data) = abi.decode(extraData, (SwapType, bytes));\\n try parallelizer.updateOracle(yieldBearingAsset) { } catch { }\\n _adjustYieldExposure(\\n amount,\\n increase,\\n yieldBearingAsset,\\n yieldBearingInfo.asset,\\n (amount * (1e9 - yieldBearingInfo.maxSlippage)) / 1e9,\\n swapType,\\n data\\n );\\n }\\n\\n /// @inheritdoc IERC3156FlashBorrower\\n /// @dev A non-zero lender fee is charged to the budget of the address that called `harvest`, alongside any\\n /// shortfall between the principal and the tokenP the rebalance minted back\\n function onFlashLoan(\\n address initiator,\\n address,\\n uint256 amount,\\n uint256 fee,\\n bytes calldata data\\n )\\n public\\n virtual\\n returns (bytes32)\\n {\\n if (msg.sender != address(flashloan) || initiator != address(this)) revert NotTrusted();\\n address sender;\\n uint256 typeAction;\\n uint256 minAmountOut;\\n SwapType swapType;\\n bytes memory callData;\\n address tokenOut;\\n address tokenIn;\\n {\\n address yieldBearingAsset;\\n address asset;\\n (sender, typeAction, yieldBearingAsset, asset, minAmountOut, swapType, callData) =\\n abi.decode(data, (address, uint256, address, address, uint256, SwapType, bytes));\\n if (typeAction == 1) {\\n // Increase yield exposure action: we bring in the yield bearing asset\\n tokenOut = yieldBearingAsset;\\n tokenIn = asset;\\n } else {\\n // Decrease yield exposure action: we bring in the deposit asset\\n tokenIn = yieldBearingAsset;\\n tokenOut = asset;\\n }\\n }\\n uint256 tokenInBalanceBefore = IERC20(tokenIn).balanceOf(address(this));\\n\\n uint256 amountOut =\\n parallelizer.swapExactInput(amount, 0, address(tokenP), tokenIn, address(this), block.timestamp);\\n // The principal is spent, what the lender will pull back is the principal plus its fee\\n amount += fee;\\n\\n // Swap to tokenOut\\n amountOut = _swapToTokenOut(typeAction, tokenIn, tokenOut, amountOut, swapType, callData);\\n\\n _adjustAllowance(tokenOut, address(parallelizer), amountOut);\\n uint256 amountStableOut =\\n parallelizer.swapExactInput(amountOut, minAmountOut, tokenOut, address(tokenP), address(this), block.timestamp);\\n\\n amountStableOut += _recoverResidualInput(tokenIn, tokenInBalanceBefore);\\n\\n if (amount > amountStableOut) {\\n budget[sender] -= amount - amountStableOut; // Will revert if not enough funds\\n } else if (amountStableOut > amount) {\\n budget[sender] += amountStableOut - amount;\\n }\\n return CALLBACK_SUCCESS;\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SETTERS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the token transfer contract\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress) public override restricted {\\n super.setTokenTransferAddress(newTokenTransferAddress);\\n }\\n\\n /**\\n * @notice Set the swap router\\n * @param newSwapRouter address of the swap router\\n */\\n function setSwapRouter(address newSwapRouter) public override restricted {\\n super.setSwapRouter(newSwapRouter);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNALS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Burns `amountStablecoins` for one yieldBearing asset, swap for asset then mints deposit tokens\\n /// from the proceeds of the swap.\\n /// @dev If `increase` is 1, then the system tries to increase its exposure to the yield bearing asset which means\\n /// burning tokenP for the deposit asset, swapping for the yield bearing asset, then minting the tokenP\\n /// @dev This function reverts if the second tokenP mint gives less than `minAmountOut` of ag tokens\\n /// @dev This function reverts if the swap slippage is higher than `maxSlippage`\\n function _adjustYieldExposure(\\n uint256 amountStablecoins,\\n uint8 increase,\\n address yieldBearingAsset,\\n address asset,\\n uint256 minAmountOut,\\n SwapType swapType,\\n bytes memory extraData\\n )\\n internal\\n {\\n flashloan.flashLoan(\\n IERC3156FlashBorrower(address(this)),\\n address(tokenP),\\n amountStablecoins,\\n abi.encode(msg.sender, increase, yieldBearingAsset, asset, minAmountOut, swapType, extraData)\\n );\\n }\\n\\n /**\\n * @dev Returns any input the route did not consume to the Parallelizer\\n * @param tokenIn address of the token offered to the route\\n * @param balanceBefore balance of `tokenIn` held before the operation\\n * @return the tokenP obtained from the remainder, zero when the route consumed everything\\n *\\n * Router calldata is built off chain while the input is sized on chain, so a route can consume\\n * less than was offered. Returning the remainder keeps it inside the Parallelizer's accounting\\n * instead of stranding it here, and it settles with the rest of the operation.\\n */\\n function _recoverResidualInput(address tokenIn, uint256 balanceBefore) internal returns (uint256) {\\n uint256 balanceAfter = IERC20(tokenIn).balanceOf(address(this));\\n if (balanceAfter <= balanceBefore) return 0;\\n uint256 residual = balanceAfter - balanceBefore;\\n _adjustAllowance(tokenIn, address(parallelizer), residual);\\n return parallelizer.swapExactInput(residual, 0, tokenIn, address(tokenP), address(this), block.timestamp);\\n }\\n\\n function _swapToTokenOut(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n SwapType swapType,\\n bytes memory callData\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (swapType == SwapType.SWAP) {\\n amountOut = _swapToTokenOutSwap(tokenIn, tokenOut, amount, callData);\\n } else if (swapType == SwapType.VAULT) {\\n amountOut = _swapToTokenOutVault(typeAction, tokenIn, tokenOut, amount);\\n }\\n }\\n\\n /**\\n * @notice Swap token using the router/aggregator\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n * @param callData bytes to call the router/aggregator\\n */\\n function _swapToTokenOutSwap(\\n address tokenIn,\\n address tokenOut,\\n uint256 amount,\\n bytes memory callData\\n )\\n internal\\n returns (uint256)\\n {\\n uint256 balance = IERC20(tokenOut).balanceOf(address(this));\\n\\n address[] memory tokens = new address[](1);\\n tokens[0] = tokenIn;\\n bytes[] memory callDatas = new bytes[](1);\\n callDatas[0] = callData;\\n uint256[] memory amounts = new uint256[](1);\\n amounts[0] = amount;\\n _swap(tokens, callDatas, amounts);\\n // A route that consumed less than offered would otherwise leave the difference approved\\n IERC20(tokenIn).forceApprove(tokenTransferAddress, 0);\\n\\n return IERC20(tokenOut).balanceOf(address(this)) - balance;\\n }\\n\\n /**\\n * @dev Deposit or redeem the vault asset\\n * @param typeAction 1 for deposit, 2 for redeem\\n * @param tokenIn address of the token to swap\\n * @param tokenOut address of the token to receive\\n * @param amount amount of token to swap\\n */\\n function _swapToTokenOutVault(\\n uint256 typeAction,\\n address tokenIn,\\n address tokenOut,\\n uint256 amount\\n )\\n internal\\n returns (uint256 amountOut)\\n {\\n if (typeAction == 1) {\\n // Granting allowance with the yieldBearingAsset for the vault asset\\n _adjustAllowance(tokenIn, tokenOut, amount);\\n amountOut = IERC4626(tokenOut).deposit(amount, address(this));\\n } else {\\n amountOut = IERC4626(tokenIn).redeem(amount, address(this), address(this));\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe10b65b2a75ead0d938a2282cf478e94ea425adb38a03ca077fa0422ec2d322c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IDiamondCut\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondCut.sol by mudgen\\n/// @dev This interface is an authorized fork of Angle's `IDiamondCut` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IDiamondCut.sol\\ninterface IDiamondCut {\\n /// @notice Add/replace/remove any number of functions and optionally execute a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments, executed with delegatecall on\\n /// _init\\n function diamondCut(FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) external;\\n}\\n\",\"keccak256\":\"0x08a01f77b740f7da424f0ea27a6a292f9e292058e23d1fe960d2d19a44496c7b\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondEtherscan.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IDiamondEtherscan\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface IDiamondEtherscan {\\n /// @notice Sets a dummy implementation with the same layout at the diamond proxy contract with all its facets\\n function setDummyImplementation(address _implementation) external;\\n\\n /// @notice Address of the dummy implementation used to make the DiamondProxy contract interpretable by Etherscan\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xf742b55592d129e02fb755d25f7a97ed976a14c4c744d6ac46726809e8f1e037\",\"license\":\"MIT\"},\"project/contracts/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @notice IDiamondLoupe\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/interfaces/IDiamondLoupe.sol by mudgen\\ninterface IDiamondLoupe {\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xa5580958acabe2c44967e835e77a748eb0b8812f70cd071191201508c9388ca8\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IDiamondCut } from \\\"./IDiamondCut.sol\\\";\\nimport { IDiamondEtherscan } from \\\"./IDiamondEtherscan.sol\\\";\\nimport { IDiamondLoupe } from \\\"./IDiamondLoupe.sol\\\";\\nimport { IGetters } from \\\"./IGetters.sol\\\";\\nimport { IRedeemer } from \\\"./IRedeemer.sol\\\";\\nimport { IRewardHandler } from \\\"./IRewardHandler.sol\\\";\\nimport { ISettersGovernor, ISettersGuardian } from \\\"./ISetters.sol\\\";\\nimport { ISwapper } from \\\"./ISwapper.sol\\\";\\nimport { ISurplus } from \\\"./ISurplus.sol\\\";\\n\\n/// @title IParallelizer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuter` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuter.sol\\ninterface IParallelizer is\\n IDiamondCut,\\n IDiamondEtherscan,\\n IDiamondLoupe,\\n IGetters,\\n IRedeemer,\\n IRewardHandler,\\n ISettersGovernor,\\n ISettersGuardian,\\n ISwapper,\\n ISurplus\\n{ }\\n\",\"keccak256\":\"0x3d43efebf663185429a411300477c3a62bf5e025fb286cf812cd0b589fb8bd5a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRebalancer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRebalancer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IHarvester` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IHarvester.sol\\ninterface IRebalancer {\\n function setYieldBearingAssetData(\\n address yieldBearingAsset,\\n address stablecoin,\\n uint64 targetExposure,\\n uint64 minExposureYieldAsset,\\n uint64 maxExposureYieldAsset,\\n uint64 overrideExposures,\\n uint64 maxSlippage\\n )\\n external;\\n\\n function updateLimitExposuresYieldAsset(address yieldBearingAsset) external;\\n\\n function setMaxSlippage(address yieldBearingAsset, uint64 newMaxSlippage) external;\\n\\n function harvest(address yieldBearingAsset, uint256 scale, bytes calldata extraData) external;\\n}\\n\",\"keccak256\":\"0x0a30a492e29ebe67db0f4cac7bfb142d04556a61282e71733d13c11daeba08b1\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISurplus.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISurplus {\\n /// @dev This function will swap the surplus of a collateral for the stable asset link to the protocol.\\n /// @param collateral The collateral address to process the surplus of.\\n /// @param maxCollateralAmount The maximum amount of collateral to process. If 0, processes the full surplus.\\n /// @return collateralSurplus The surplus of the collateral actually processed.\\n /// @return stableSurplus The surplus amount in stable calculated from the collateral surplus.\\n /// @return issuedAmount The amount of newly issued stablecoins from the collateral swapped\\n function processSurplus(\\n address collateral,\\n uint256 maxCollateralAmount\\n )\\n external\\n returns (uint256 collateralSurplus, uint256 stableSurplus, uint256 issuedAmount);\\n\\n /// @notice Releases the income to the payees\\n /// @return payees The addresses of the payees\\n /// @return amounts The amounts released to the payees\\n function release() external returns (address[] memory payees, uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x0129ea80a666d553ddd13c02f56a72cc96a6ac4e45578f0f523def2732ce450f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title ISwapper\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISwapper` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISwapper.sol\\ninterface ISwapper {\\n /// @notice Swaps (that is to say mints or burns) an exact amount of `tokenIn` for an amount of `tokenOut`\\n /// @param amountIn Amount of `tokenIn` to bring\\n /// @param amountOutMin Minimum amount of `tokenOut` to get: if `amountOut` is inferior to this amount, the\\n /// function will revert\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountOut Amount of `tokenOut` obtained through the swap\\n function swapExactInput(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactInput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactInputWithPermit(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Swaps (that is to say mints or burns) an amount of `tokenIn` for an exact amount of `tokenOut`\\n /// @param amountOut Amount of `tokenOut` to obtain from the swap\\n /// @param amountInMax Maximum amount of `tokenIn` to bring in order to get `amountOut` of `tokenOut`\\n /// @param tokenIn Token to bring for the swap\\n /// @param tokenOut Token to get out of the swap\\n /// @param to Address to which `tokenOut` must be sent\\n /// @param deadline Timestamp before which the transaction must be executed\\n /// @return amountIn Amount of `tokenIn` used to perform the swap\\n function swapExactOutput(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactOutput`, but using Permit2 signatures for `tokenIn`\\n /// @dev Can only be used to mint, hence `tokenOut` is not needed\\n function swapExactOutputWithPermit(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address to,\\n uint256 deadline,\\n bytes calldata permitData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Same as `swapExactInput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeSwapExactInputNonce(...)`,\\n /// which binds the full swap intent. `authData.nonce` carries the caller-chosen `userSalt`; the\\n /// facet recomputes the derived nonce from the call arguments before forwarding it to the\\n /// token, so any tampering with `to`/slippage/deadline invalidates the signature.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactInputWithAuthorization(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountOut);\\n\\n /// @notice Same as `swapExactOutput`, but using a single EIP-3009 authorization for `tokenIn`.\\n /// @dev The authorization must be signed for `amountInMax`; the excess is refunded to the\\n /// authorizer. Derived-nonce scheme as in `swapExactInputWithAuthorization`, using\\n /// `LibAuthorization.computeSwapExactOutputNonce(...)`.\\n /// @param authData ABI-encoded `AuthorizationParams` with `nonce = userSalt`\\n function swapExactOutputWithAuthorization(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address tokenIn,\\n address tokenOut,\\n address to,\\n uint256 deadline,\\n bytes calldata authData\\n )\\n external\\n returns (uint256 amountIn);\\n\\n /// @notice Simulates what a call to `swapExactInput` with `amountIn` of `tokenIn` for `tokenOut` would give.\\n /// If called right before and at the same block, the `amountOut` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactInput`\\n function quoteIn(uint256 amountIn, address tokenIn, address tokenOut) external view returns (uint256 amountOut);\\n\\n /// @notice Simulates what a call to `swapExactOutput` for `amountOut` of `tokenOut` with `tokenIn` would give.\\n /// If called right before and at the same block, the `amountIn` outputted by this function is exactly the\\n /// amount that will be obtained with `swapExactOutput`\\n function quoteOut(uint256 amountOut, address tokenIn, address tokenOut) external view returns (uint256 amountIn);\\n}\\n\",\"keccak256\":\"0xbf7e08cff6dd51c222f86976d3526307098b80100c81978a55566043924cfc06\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol)\\n\\npragma solidity >=0.5.0;\\n\\n/// @notice ERC4626 interface\\n/// @author OpenZeppelin\\n/// @dev In this implementation, the interface only contains the functions that the IERC4626 interface adds on top of\\n/// the IERC20 interface\\ninterface IERC4626 {\\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\":\"0xd730d6a6b679201eec89dff3133de651da20b3e72e74f01b734078bfacf952ad\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/AccessManaged.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { IAccessManaged } from \\\"@openzeppelin/contracts/access/manager/IAccessManaged.sol\\\";\\nimport { Context } from \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\n\\nimport \\\"../utils/Errors.sol\\\";\\n\\n/// @title AccessControl\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Fork of OpenZeppelin's `AccessManaged` contract\\n/// updated to make _checkCanCall to return bool\\n/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/manager/AccessManaged.sol\\ncontract AccessManaged is Context, IAccessManaged {\\n address private _authority;\\n\\n bool private _consumingSchedule;\\n\\n /**\\n * @dev Initializes the contract connected to an initial authority.\\n */\\n constructor(address initialAuthority) {\\n _setAuthority(initialAuthority);\\n }\\n\\n /**\\n * @dev Restricts access to a function as defined by the connected Authority for this contract and the\\n * caller and selector of the function that entered the contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * In general, this modifier should only be used on `external` functions. It is okay to use it on `public`\\n * functions that are used as external entry points and are not called internally. Unless you know what you're\\n * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security\\n * implications! This is because the permissions are determined by the function that entered the contract, i.e. the\\n * function at the bottom of the call stack, and not the function where the modifier is visible in the source code.\\n * ====\\n *\\n * [WARNING]\\n * ====\\n * Avoid adding this modifier to the\\n * https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]\\n * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These\\n * functions are the only execution paths where a function selector cannot be unambiguously determined from the\\n * calldata\\n * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()`\\n * function\\n * if no calldata is provided. (See {_checkCanCall}).\\n *\\n * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.\\n * ====\\n */\\n modifier restricted() {\\n address caller = _msgSender();\\n require(_checkCanCall(caller, _msgData()), AccessManagedUnauthorized(caller));\\n _;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function authority() public view virtual returns (address) {\\n return _authority;\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function setAuthority(address newAuthority) public virtual {\\n address caller = _msgSender();\\n if (caller != authority()) {\\n revert AccessManagedUnauthorized(caller);\\n }\\n if (newAuthority.code.length == 0) {\\n revert AccessManagedInvalidAuthority(newAuthority);\\n }\\n _setAuthority(newAuthority);\\n }\\n\\n /// @inheritdoc IAccessManaged\\n function isConsumingScheduledOp() public view returns (bytes4) {\\n return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /**\\n * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the\\n * permissions set by the current authority.\\n */\\n function _setAuthority(address newAuthority) internal virtual {\\n _authority = newAuthority;\\n emit AuthorityUpdated(newAuthority);\\n }\\n\\n function _checkCanCall(address caller, bytes calldata data) internal virtual returns (bool) {\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(authority(), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n _consumingSchedule = true;\\n IAccessManager(authority()).consumeScheduledOp(caller, data);\\n _consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x40dfee0e736695b3005df6c150a2d794ac06f3f4b91745e2959623e770044798\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"},\"project/libs/helpers/RouterSwapper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/// @title Swapper\\n/// @author Angle Labs, Inc.\\n/// @dev Abstract contract for swapping tokens using a router/aggregator\\n/// @dev This contract is an authorized fork of Angle's `RouterSwapper` contract\\n/// https://github.com/AngleProtocol/utils/blob/main/src/RouterSwapper.sol\\nabstract contract RouterSwapper {\\n using SafeERC20 for IERC20;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERRORS\\n //////////////////////////////////////////////////////////////*/\\n\\n error SwapError();\\n error ZeroAddress();\\n\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Event emitted when the swap router is updated\\n */\\n event SwapRouterUpdated(address newSwapRouter);\\n /**\\n * @notice Event emitted when the token proxy is updated\\n */\\n event TokenTransferAddressUpdated(address newTokenTransferAddress);\\n\\n /*//////////////////////////////////////////////////////////////\\n MODIFIERS\\n //////////////////////////////////////////////////////////////*/\\n\\n modifier noZeroAddress(address targetAddress) {\\n if (targetAddress == address(0)) {\\n revert ZeroAddress();\\n }\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n MUTABLE VARIABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice address of the router/aggregator\\n */\\n address public swapRouter;\\n /**\\n * @notice address to approve to transfer tokens to\\n */\\n address public tokenTransferAddress;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(address initialSwapRouter, address initialTokenTransferAddress) {\\n swapRouter = initialSwapRouter;\\n tokenTransferAddress = initialTokenTransferAddress;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ADMIN FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Set the router/aggregator address\\n * @param newSwapRouter address of the new router/aggregator\\n */\\n function setSwapRouter(address newSwapRouter) public virtual noZeroAddress(newSwapRouter) {\\n swapRouter = newSwapRouter;\\n\\n emit SwapRouterUpdated(newSwapRouter);\\n }\\n\\n /**\\n * @notice Set the token transfer address\\n * @param newTokenTransferAddress address of the new token transfer address\\n */\\n function setTokenTransferAddress(address newTokenTransferAddress)\\n public\\n virtual\\n noZeroAddress(newTokenTransferAddress)\\n {\\n tokenTransferAddress = newTokenTransferAddress;\\n\\n emit TokenTransferAddressUpdated(newTokenTransferAddress);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n SWAP FUNCTIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n /**\\n * @notice Approve the router/aggregator to spend the token if needed\\n * @param token address of the token to approve\\n * @param spender address of the router/aggregator\\n * @param amount amount to approve\\n */\\n function _approveTokenIfNeeded(address token, address spender, uint256 amount) internal {\\n uint256 allowance = IERC20(token).allowance(address(this), spender);\\n if (allowance < amount) {\\n IERC20(token).safeIncreaseAllowance(spender, amount - allowance);\\n }\\n }\\n\\n /**\\n * @notice Perform the swap using the router/aggregator\\n * @param callData bytes to call the router/aggregator\\n */\\n function _performRouterSwap(bytes memory callData) internal {\\n (bool success, bytes memory retData) = swapRouter.call(callData);\\n\\n if (!success) {\\n if (retData.length != 0) {\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, retData), mload(retData))\\n }\\n }\\n revert SwapError();\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swapCalldata(address[] calldata tokens, bytes[] calldata callDatas, uint256[] calldata amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n\\n /**\\n * @notice Swap tokens using the router/aggregator\\n * @param tokens array of tokens to swap\\n * @param callDatas array of bytes to call the router/aggregator\\n * @param amounts array of amounts to swap\\n */\\n function _swap(address[] memory tokens, bytes[] memory callDatas, uint256[] memory amounts) internal {\\n uint256 length = tokens.length;\\n for (uint256 i; i < length; ++i) {\\n _approveTokenIfNeeded(tokens[i], tokenTransferAddress, amounts[i]);\\n _performRouterSwap(callDatas[i]);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8c5a6b026a95816806814ef681b6b225ea4c405a39a4eab0111921853202829c\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "storageLayout": { + "storage": [ + { + "astId": 29857, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_authority", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 29859, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "_consumingSchedule", + "offset": 20, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 10262, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "yieldBearingData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)" + }, + { + "astId": 10267, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "isTrusted", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 30616, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "swapRouter", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 30619, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "tokenTransferAddress", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 11058, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "budget", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_struct(YieldBearingParams)10202_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct YieldBearingParams)", + "numberOfBytes": "32", + "value": "t_struct(YieldBearingParams)10202_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(YieldBearingParams)10202_storage": { + "encoding": "inplace", + "label": "struct YieldBearingParams", + "members": [ + { + "astId": 10191, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "asset", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 10193, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "targetExposure", + "offset": 20, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 10195, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxExposure", + "offset": 0, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10197, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "minExposure", + "offset": 8, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10199, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "overrideExposures", + "offset": 16, + "slot": "1", + "type": "t_uint64" + }, + { + "astId": 10201, + "contract": "project/contracts/helpers/GenericRebalancer.sol:GenericRebalancer", + "label": "maxSlippage", + "offset": 24, + "slot": "1", + "type": "t_uint64" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + }, + "userdoc": { + "events": { + "SwapRouterUpdated(address)": { + "notice": "Event emitted when the swap router is updated" + }, + "TokenTransferAddressUpdated(address)": { + "notice": "Event emitted when the token proxy is updated" + } + }, + "kind": "user", + "methods": { + "addBudget(uint256,address)": { + "notice": "Add budget to be spent by the receiver during the flashloan" + }, + "budget(address)": { + "notice": "Budget of tokenP available for each users" + }, + "computeRebalanceAmount(address)": { + "notice": "Compute the amount needed to rebalance the Parallelizer" + }, + "flashloan()": { + "notice": "Parallel stablecoin flashloan contract" + }, + "harvest(address,uint256,bytes)": { + "notice": "Invests or divests from the yield asset associated to `yieldBearingAsset` based on the current exposure to this yieldBearingAsset" + }, + "isTrusted(address)": { + "notice": "trusted addresses that can update target exposure and do others non critical operations" + }, + "parallelizer()": { + "notice": "Reference to the `parallelizer` implementation this contract aims at rebalancing" + }, + "recoverERC20(address,uint256,address)": { + "notice": "Recover ERC20 tokens" + }, + "removeBudget(uint256,address)": { + "notice": "Remove budget from the owner and send it to the receiver" + }, + "resetAllowance(address,address)": { + "notice": "Set an allowance this contract granted back to zero" + }, + "setMaxSlippage(address,uint64)": { + "notice": "Set the max allowed slippage" + }, + "setSwapRouter(address)": { + "notice": "Set the swap router" + }, + "setTargetExposure(address,uint64)": { + "notice": "Set the target exposure of a yield bearing asset" + }, + "setTokenTransferAddress(address)": { + "notice": "Set the token transfer address" + }, + "setYieldBearingAssetData(address,address,uint64,uint64,uint64,uint64,uint64)": { + "notice": "Set the yieldBearingAsset data" + }, + "swapRouter()": { + "notice": "address of the router/aggregator" + }, + "toggleTrusted(address)": { + "notice": "Toggle the trusted status of an address" + }, + "tokenP()": { + "notice": "TokenP handled by the `parallelizer` of interest" + }, + "tokenTransferAddress()": { + "notice": "address to approve to transfer tokens to" + }, + "updateLimitExposuresYieldAsset(address)": { + "notice": "Set the limit exposures to the asset linked to the yield bearing asset" + }, + "yieldBearingData(address)": { + "notice": "Data associated to a yield bearing asset" + } + }, + "version": 1 + }, + "argsData": "0x000000000000000000000000cf5540fffcdc3d510b18bfca6d2b9987b0772559000000000000000000000000cf5540fffcdc3d510b18bfca6d2b9987b07725590000000000000000000000009b3a8f7cec208e247d97dee13313690977e244590000000000000000000000006efeddf9269c3683ba516cb0e2124fe335f262a2000000000000000000000000a66814ee197d8334274aaeeb4987c534789a8194000000000000000000000000c9b6279baa19dbb8bcc3250c89caa093aaba0bfc", + "transaction": { + "hash": "0xa99b25449770d9f07c225e9f2fc30fe7e65bc533db3b04f755b381af56848f52", + "nonce": "0x10a", + "origin": "0x66CcEC236bbcE5f1bBd1b2fC0a4014e57A55ad02" + }, + "receipt": { + "blockHash": "0xb4d5e44cf0acb7335f8354db9f35efbda29eaea4a286c76408efe40945f8643c", + "blockNumber": "0x18fbcd5", + "transactionIndex": "0x55" + } +} \ No newline at end of file diff --git a/deployments/mainnet/Getters.json b/deployments/mainnet/Getters.json index 68c5226..34c73cc 100644 --- a/deployments/mainnet/Getters.json +++ b/deployments/mainnet/Getters.json @@ -1,5 +1,5 @@ { - "address": "0x4e899b0ab9b7a0fd5fc0dd288fab8a581bb40986", + "address": "0x5db9553cf9bdfcc78d02f5d5d474ccb2f167bfc7", "abi": [ { "inputs": [], @@ -549,6 +549,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getSwapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getTotalIssued", @@ -752,8 +765,8 @@ ], "contractName": "Getters", "sourceName": "contracts/parallelizer/facets/Getters.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061415b8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101dc575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610645578063f9839d891461068c578063fdcb6068146106ce578063fe7d0c54146106fe575f5ffd5b8063cd377c531461057f578063cfad0a32146105a7578063d5002f2e146105ce578063eb7aac5f146105f5575f5ffd5b8063ad33ddd0116100d9578063ad33ddd01461053c578063adc9d1f71461054f578063b718136114610557578063b85780bc1461056c575f5ffd5b806394e35d9e146104a457806396d64879146104cc57806399eeca4914610516578063a52aefd414610529575f5ffd5b8063333522101161017f578063782513bd1161014f578063782513bd14610422578063847da7be146104425780638db9653f146104635780638fb360371461046b575f5ffd5b8063333522101461033a57806338c269eb1461035a5780634ea3e3431461039557806377dc3429146103b7575f5ffd5b80631978a5ed116101ba5780631978a5ed1461028157806323bafad7146102b257806327f38113146102ed57806331da6b1314610303575f5ffd5b80630baaa34d146101e05780630d1266271461023a57806310d3d22e1461025d575b5f5ffd5b6102276101ee366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61024d610248366004613451565b610748565b6040519015158152602001610231565b61027061026b366004613436565b610857565b6040516102319594939291906134ed565b5f5160206141065f395f51905f52546001600160a01b03165b6040516001600160a01b039091168152602001610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff9091168152602001610231565b6102f5610879565b604051610231929190613582565b610227610311366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f52602052604090206009015490565b61034d610348366004613436565b610a21565b6040516102319190613674565b61036d610368366004613436565b610ee2565b604080519586526020860194909452928401919091526060830152608082015260a001610231565b6103a86103a3366004613436565b610fdd565b604051610231939291906137d2565b61024d6103c5366004613808565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b610435610430366004613436565b61112c565b6040516102319190613847565b610455610450366004613436565b6111e4565b604051610231929190613859565b61022761130f565b61047361137c565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610231565b6104b76104b2366004613436565b6113d7565b60408051928352602083019190915201610231565b61024d6104da366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61024d610524366004613889565b6114b2565b61024d6105373660046138b5565b61152b565b6104b761054a366004613436565b6115fe565b610455611612565b61055f611766565b60405161023191906138d1565b61045561057a366004613436565b6117d5565b6105876118b8565b6040805167ffffffffffffffff9093168352602083019190915201610231565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610227565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610227565b610633610603366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f5260205260409020546301000000900460ff1690565b60405160ff9091168152602001610231565b610227610653366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b61024d61069a366004613436565b6001600160a01b03165f9081525f5160206140e65f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b031661029a565b61024d61070c366004613436565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f8082600281111561075c5761075c61348b565b1480610779575060018260028111156107775761077761348b565b145b15610823576001600160a01b0383165f9081525f5160206140e65f395f51905f526020526040812080549091630100000090910460ff1690036107e8576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8360028111156107fb576107fb61348b565b036108115754610100900460ff16159050610851565b5462010000900460ff16159050610851565b5f5160206141065f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f606080606061086786611939565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141065f395f51905f52905f9067ffffffffffffffff8111156108c9576108c96138e3565b6040519080825280602002602001820160405280156108f2578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff811115610915576109156138e3565b60405190808252806020026020018201604052801561093e578160200160208202803683370190505b5090505f5b600d840154811015610a165783600d018181548110610964576109646138f7565b905f5260205f20015f9054906101000a90046001600160a01b0316838281518110610991576109916138f7565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d0183815481106109cb576109cb6138f7565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a0357610a036138f7565b6020908102919091010152600101610943565b509094909350915050565b610a29613384565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b2c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610ae75790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610ba457602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610b705790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c2d57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610be85790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610c715790505b50505050508152602001600582018054610cbe9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cea9061390b565b8015610d355780601f10610d0c57610100808354040283529160200191610d35565b820191905f5260205f20905b815481529060010190602001808311610d1857829003601f168201915b50505050508152602001600682018054610d4e9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7a9061390b565b8015610dc55780601f10610d9c57610100808354040283529160200191610dc5565b820191905f5260205f20905b815481529060010190602001808311610da857829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e3457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e16575b50505050508152602001600182018054610e4d9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061390b565b8015610ec45780601f10610e9b57610100808354040283529160200191610ec4565b820191905f5260205f20905b815481529060010190602001808311610ea757829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141065f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f1c9061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f489061390b565b8015610f935780601f10610f6a57610100808354040283529160200191610f93565b820191905f5260205f20905b815481529060010190602001808311610f7657829003601f168201915b50505050509050610fa3816119f7565b9095509350610fb28782611b64565b509250610fbe81611d4c565b858585610fca85611e4f565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604081208054606091829160ff1615611108576007810180546040805160208084028201810190925282815260019392600886019284919083018282801561106b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161104d575b5050505050915080805461107e9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546110aa9061390b565b80156110f55780601f106110cc576101008083540402835291602001916110f5565b820191905f5260205f20905b8154815290600101906020018083116110d857829003601f168201915b5050505050905093509350935050611125565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602052604090206006018054606091906111619061390b565b80601f016020809104026020016040519081016040528092919081815260200182805461118d9061390b565b80156111d85780601f106111af576101008083540402835291602001916111d8565b820191905f5260205f20905b8154815290600101906020018083116111bb57829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060038101805484518185028101850190955280855260609485946004850192849183018282801561128c57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112475790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116112ca5790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141065f395f51905f52906b033b2e3c9fd0803ce80000009061136c906001600160801b03600160801b820481169116613951565b611376919061397c565b91505090565b5f5f5160206141065f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113b257505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206140e65f395f51905f526020526040812054909182915f5160206141065f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce80000009061146c9083906501000000000090046001600160d81b0316613951565b611476919061397c565b60018301546b033b2e3c9fd0803ce80000009061149d9084906001600160801b0316613951565b6114a7919061397c565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d818580156114e5576114e561348b565b80156114f3576114f361348b565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206140e65f395f51905f52602052604081208054640100000000900460ff1615806115f657506115f68160060180546115749061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546115a09061390b565b80156115eb5780601f106115c2576101008083540402835291602001916115eb565b820191905f5260205f20905b8154815290600101906020018083116115ce57829003601f168201915b505050505084611f1b565b949350505050565b5f5f6116098361208c565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141065f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7992909184918301828280156116e457602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161169f5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561175657602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116117225790505b5050505050905092509250509091565b60605f5160206141065f395f51905f526002018054806020026020016040519081016040528092919081815260200182805480156117cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117ad575b5050505050905090565b6001600160a01b0381165f9081525f5160206140e65f395f51905f52602090815260409182902060018101805484518185028101850190955280855260609485946002850192849183018282801561128c575f918252602091829020805467ffffffffffffffff16845290820283019290916008910180841161124757905050505050509150808054806020026020016040519081016040528092919081815260200182805480156112fe575f918252602091829020805460070b84529082028301929091600891018084116112ca579050505050505090509250925050915091565b5f5160206141065f395f51905f5280545f91829160ff75010000000000000000000000000000000000000000009091041660011901611923576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61192b6123c1565b509296919550909350505050565b5f80606080806108675f5160206141065f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119769061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546119a29061390b565b80156119ed5780601f106119c4576101008083540402835291602001916119ed565b820191905f5260205f20905b8154815290600101906020018083116119d057829003601f168201915b505050505061296e565b5f5f5f5f5f5f5f611a078861296e565b9398509196509450925090506001856009811115611a2757611a2761348b565b03611ab1575f83806020019051810190611a41919061398f565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611a7e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa291906139aa565b97509750505050505050915091565b5f5f82806020019051810190611ac791906139e7565b915091505f611ae288888888876001600160801b0316612989565b909a50670de0b6b3a764000099509050611b056001600160801b0383168a613a18565b611b0f9082613951565b611b21670de0b6b3a76400008c613951565b1015611b4b5780611b3a670de0b6b3a76400008c613951565b611b44919061397c565b9850611b57565b808a1015611b57578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141065f395f51905f52938593929190830182828015611bf157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611bd3575b505083519394505f925050505b81811015611d41575f670de0b6b3a76400009050886001600160a01b0316848381518110611c2e57611c2e6138f7565b60200260200101516001600160a01b031614611d1d57611d14856005015f868581518110611c5e57611c5e6138f7565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611c939061390b565b80601f0160208091040260200160405190810160405280929190818152602001828054611cbf9061390b565b8015611d0a5780601f10611ce157610100808354040283529160200191611d0a565b820191905f5260205f20905b815481529060010190602001808311611ced57829003601f168201915b50505050506119f7565b9150611d2c9050565b611d26886119f7565b90965090505b86811015611d38578096505b50600101611bfe565b505050509250929050565b5f5f5f5f5f5f611d5b8761296e565b9398509196509450925090506001856009811115611d7b57611d7b61348b565b03611e03575f83806020019051810190611d95919061398f565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dd3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611df79190613a2b565b98975050505050505050565b5f81806020019051810190611e1891906139e7565b5090505f611e3287878787866001600160801b0316612989565b909850905087811015611e43578097505b50505050505050919050565b5f5f5f5f5f611e5d8661296e565b50929650909450925090506001846009811115611e7c57611e7c61348b565b03611f03575f82806020019051810190611e96919061398f565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ef89190613a2b565b979650505050505050565b611f10848484845f612989565b509695505050505050565b5f5f5f84806020019051810190611f329190613adf565b915091505f611f4b5f5160206141065f395f51905f5290565b6008015f848015611f5e57611f5e61348b565b8015611f6c57611f6c61348b565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fac57600192505050610851565b805115612082575f828015611fc357611fc361348b565b03612082575f81806020019051810190611fdd919061398f565b90506001600160a01b03811615612080576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612052573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120769190613b2d565b9350505050610851565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141065f395f51905f529067ffffffffffffffff168203612103576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061212686612a26565b90505f6121bc83600501805461213b9061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121679061390b565b80156121b25780601f10612189576101008083540402835291602001916121b2565b820191905f5260205f20905b81548152906001019060200180831161219557829003601f168201915b5050505050611e4f565b90505f6122528460050180546121d19061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546121fd9061390b565b80156122485780601f1061221f57610100808354040283529160200191612248565b820191905f5260205f20905b81548152906001019060200180831161222b57829003601f168201915b5050505050611d4c565b90505f61228c846122638585612ae0565b61226d9190613951565b8654612284906301000000900460ff166012613b4c565b60125f612af2565b600187015486549192505f916b033b2e3c9fd0803ce8000000916122d391600160801b9091046001600160801b0316906501000000000090046001600160d81b0316613951565b6122dd919061397c565b600a8801549091505f9067ffffffffffffffff166122ff633b9aca0085613951565b612309919061397c565b905081811161232b5760405163493df25360e01b815260040160405180910390fd5b6123358282613a18565b600a89015490995061235b908a906123569067ffffffffffffffff16612b6b565b612ae0565b9850885f0361237d5760405163493df25360e01b815260040160405180910390fd5b6123b284612393670de0b6b3a76400008c613951565b61239d919061397c565b88546012906301000000900460ff165f612af2565b99505050505050505050915091565b5f8060608080835f5160206141065f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561243057602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311612412575b505050505090505f815190505f8167ffffffffffffffff811115612456576124566138e3565b60405190808252806020026020018201604052801561247f578160200160208202803683370190505b5095505f5b8281101561255157856005015f8583815181106124a3576124a36138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036124e1576124da82613b65565b915061252b565b856005015f8583815181106124f8576124f86138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125289083613b7d565b91505b8187828151811061253e5761253e6138f7565b6020908102919091010152600101612484565b508067ffffffffffffffff81111561256b5761256b6138e3565b604051908082528060200260200182016040528015612594578160200160208202803683370190505b5096508067ffffffffffffffff8111156125b0576125b06138e3565b6040519080825280602002602001820160405280156125d9578160200160208202803683370190505b5097505f5f5b838110156128fa575f876005015f8784815181106125ff576125ff6138f7565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561279d5760606126c88360070160010180546126479061390b565b80601f01602080910402602001604051908101604052809291908181526020018280546126739061390b565b80156126be5780601f10612695576101008083540402835291602001916126be565b820191905f5260205f20905b8154815290600101906020018083116126a157829003601f168201915b5050505050612bdf565b81519093509091505f5b8181101561278957600785018054829081106126f0576126f06138f7565b5f918252602090912001546001600160a01b03168f61270f838a613b7d565b8151811061271f5761271f6138f7565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110612751576127516138f7565b60200260200101518e82896127669190613b7d565b81518110612776576127766138f7565b60209081029190910101526001016126d2565b506127948187613b7d565b95505050612892565b8683815181106127af576127af6138f7565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128219190613a2b565b9050868381518110612835576128356138f7565b60200260200101518c858151811061284f5761284f6138f7565b6001600160a01b0390921660209283029190910190910152808b8561287381613b65565b965081518110612885576128856138f7565b6020026020010181815250505b5f6128a583600501805461213b9061390b565b8354909150670de0b6b3a7640000906128cc9084906301000000900460ff1660125f612af2565b6128d69083613951565b6128e0919061397c565b6128ea908a613b7d565b98505050508060010190506125df565b505060018086015461292e916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612c83565b985088156129565761294f61294a85633b9aca008c6001612c83565b612cce565b9950612962565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108679190613b9e565b5f5f61299e86670de0b6b3a764000086612d25565b90506129ab878287612d25565b91506129bf670de0b6b3a764000083613951565b6129d184670de0b6b3a7640000613a18565b6129db9083613951565b108015612a1357506129f583670de0b6b3a7640000613b7d565b6129ff9082613951565b612a11670de0b6b3a764000084613951565b105b15612a1c578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206140e65f395f51905f5260205260408120805460ff1615612a7157612a688160070160010180546126479061390b565b9250612ada9050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612ab3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ad79190613a2b565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b2e575f612b0c8486613c4d565b612b1790600a613d49565b9050612b268660018386612c83565b9150506115f6565b8260ff168460ff161015612b6257612b468484613c4d565b612b5190600a613d49565b612b5b9086613951565b90506115f6565b50929392505050565b5f5f5f612b766123c1565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bb15760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612bcb9082908516613a18565b612bd59083613951565b6115f6919061397c565b60605f5f5f612bed85613124565b90925090505f828015612c0257612c0261348b565b03612c7c5780806020019051810190612c1b919061398f565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c55573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114a79190810190613d7a565b5050915091565b5f612cb0612c9083613145565b8015612cab57505f8480612ca657612ca6613968565b868809115b151590565b612cbb868686613171565b612cc59190613b7d565b95945050505050565b5f67ffffffffffffffff821115612d2157604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d3957612d3961348b565b03612e09575f5f5f5f5f86806020019051810190612d579190613f07565b945094509450945094505f612d6c828a613221565b86519091505f5b81811015612df957612def83898381518110612d9157612d916138f7565b6020026020010151888481518110612dab57612dab6138f7565b6020026020010151888581518110612dc557612dc56138f7565b602002602001015160ff168b8681518110612de257612de26138f7565b6020026020010151613250565b9250600101612d73565b5081975050505050505050612aeb565b6003846009811115612e1d57612e1d61348b565b03612e315750670de0b6b3a7640000612aeb565b6002846009811115612e4557612e4561348b565b03612e51575081612aeb565b6004846009811115612e6557612e6561348b565b03612f03576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612efc9190613a2b565b9050612aeb565b6005846009811115612f1757612f1761348b565b03612f6c5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6006846009811115612f8057612f8061348b565b03612fd55773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b6007846009811115612fe957612fe961348b565b0361303e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed8573d5f5f3e3d5ffd5b60088460098111156130525761305261348b565b03613075575f8280602001905181019061306c9190613a2b565b9150612aeb9050565b60098460098111156130895761308961348b565b0361311c575f5f838060200190518101906130a49190614032565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131099190613a2b565b613113919061397c565b92505050612aeb565b509092915050565b5f60608280602001905181019061313b9190613adf565b9094909350915050565b5f600282600381111561315a5761315a61348b565b613164919061405e565b60ff166001149050919050565b5f5f5f61317e8686613357565b91509150815f036131a25783818161319857613198613968565b0492505050612aeb565b8184116131b9576131b96003851502601118613373565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f808360018111156132355761323561348b565b036132495750670de0b6b3a7640000610851565b5080610851565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561328f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132b39190614098565b509350509250505f821315806132d7575063ffffffff84166132d58242613a18565b115b1561330e576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166001036133415761332485600a6140da565b61332e838a613951565b613338919061397c565b92505050612cc5565b8161334d86600a6140da565b61332e908a613951565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b03168152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001613413604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b0381168114613433575f5ffd5b50565b5f60208284031215613446575f5ffd5b8135612aeb8161341f565b5f5f60408385031215613462575f5ffd5b823561346d8161341f565b9150602083013560038110613480575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134bb57634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6134f7818761349f565b613504602082018661349f565b60a060408201525f61351960a08301866134bf565b828103606084015261352b81866134bf565b90508281036080840152611df781856134bf565b5f8151808452602084019350602083015f5b828110156135785781516001600160a01b0316865260209586019590910190600101613551565b5093949350505050565b604081525f613594604083018561353f565b82810360208401528084518083526020830191506020860192505f5b818110156135ce5783518352602093840193909201916001016135b0565b50909695505050505050565b5f8151808452602084019350602083015f5b8281101561357857815167ffffffffffffffff168652602095860195909101906001016135ec565b5f8151808452602084019350602083015f5b8281101561357857815160070b865260209586019590910190600101613626565b5f81516040845261365b604085018261353f565b905060208301518482036020860152612cc582826134bf565b6020815261368860208201835160ff169052565b5f602083015161369d604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526136fb6101e08401826135da565b905060e0840151601f19848303016101008501526137198282613614565b915050610100840151601f198483030161012085015261373982826135da565b915050610120840151601f19848303016101408501526137598282613614565b915050610140840151601f198483030161016085015261377982826134bf565b915050610160840151601f198483030161018085015261379982826134bf565b915050610180840151601f19848303016101a08501526137b98282613647565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f6137ec606083018561353f565b82810360408401526137fe81856134bf565b9695505050505050565b5f60208284031215613818575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612aeb575f5ffd5b602081525f612aeb60208301846134bf565b604081525f61386b60408301856135da565b8281036020840152612cc58185613614565b60018110613433575f5ffd5b5f5f6040838503121561389a575f5ffd5b82356138a58161387d565b915060208301356134808161341f565b5f5f604083850312156138c6575f5ffd5b82356138a58161341f565b602081525f612aeb602083018461353f565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061391f57607f821691505b602082108103612ada57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108515761085161393d565b634e487b7160e01b5f52601260045260245ffd5b5f8261398a5761398a613968565b500490565b5f6020828403121561399f575f5ffd5b8151612aeb8161341f565b5f5f604083850312156139bb575f5ffd5b505080516020909101519092909150565b80516001600160801b03811681146139e2575f5ffd5b919050565b5f5f604083850312156139f8575f5ffd5b613a01836139cc565b9150613a0f602084016139cc565b90509250929050565b818103818111156108515761085161393d565b5f60208284031215613a3b575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a6b57613a6b6138e3565b604052919050565b5f82601f830112613a82575f5ffd5b815167ffffffffffffffff811115613a9c57613a9c6138e3565b613aaf601f8201601f1916602001613a42565b818152846020838601011115613ac3575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613af0575f5ffd5b8251613afb8161387d565b602084015190925067ffffffffffffffff811115613b17575f5ffd5b613b2385828601613a73565b9150509250929050565b5f60208284031215613b3d575f5ffd5b81518015158114612aeb575f5ffd5b60ff81811683821601908111156108515761085161393d565b5f60018201613b7657613b7661393d565b5060010190565b808201808211156108515761085161393d565b8051600a81106139e2575f5ffd5b5f5f5f5f5f60a08688031215613bb2575f5ffd5b613bbb86613b90565b9450613bc960208701613b90565b9350604086015167ffffffffffffffff811115613be4575f5ffd5b613bf088828901613a73565b935050606086015167ffffffffffffffff811115613c0c575f5ffd5b613c1888828901613a73565b925050608086015167ffffffffffffffff811115613c34575f5ffd5b613c4088828901613a73565b9150509295509295909350565b60ff82811682821603908111156108515761085161393d565b6001815b6001841115613ca157808504811115613c8557613c8561393d565b6001841615613c9357908102905b60019390931c928002613c6a565b935093915050565b5f82613cb757506001610851565b81613cc357505f610851565b8160018114613cd95760028114613ce357613cff565b6001915050610851565b60ff841115613cf457613cf461393d565b50506001821b610851565b5060208310610133831016604e8410600b8410161715613d22575081810a610851565b613d2e5f198484613c66565b805f1904821115613d4157613d4161393d565b029392505050565b5f612aeb60ff841683613ca9565b5f67ffffffffffffffff821115613d7057613d706138e3565b5060051b60200190565b5f5f60408385031215613d8b575f5ffd5b825167ffffffffffffffff811115613da1575f5ffd5b8301601f81018513613db1575f5ffd5b8051613dc4613dbf82613d57565b613a42565b8082825260208201915060208360051b850101925087831115613de5575f5ffd5b6020840193505b82841015613e07578351825260209384019390910190613dec565b6020969096015195979596505050505050565b5f82601f830112613e29575f5ffd5b8151613e37613dbf82613d57565b8082825260208201915060208360051b860101925085831115613e58575f5ffd5b602085015b83811015613e8657805163ffffffff81168114613e78575f5ffd5b835260209283019201613e5d565b5095945050505050565b5f82601f830112613e9f575f5ffd5b8151613ead613dbf82613d57565b8082825260208201915060208360051b860101925085831115613ece575f5ffd5b602085015b83811015613e8657805160ff81168114613eeb575f5ffd5b835260209283019201613ed3565b8051600281106139e2575f5ffd5b5f5f5f5f5f60a08688031215613f1b575f5ffd5b855167ffffffffffffffff811115613f31575f5ffd5b8601601f81018813613f41575f5ffd5b8051613f4f613dbf82613d57565b8082825260208201915060208360051b85010192508a831115613f70575f5ffd5b6020840193505b82841015613f9b578351613f8a8161341f565b825260209384019390910190613f77565b80985050505050602086015167ffffffffffffffff811115613fbb575f5ffd5b613fc788828901613e1a565b945050604086015167ffffffffffffffff811115613fe3575f5ffd5b613fef88828901613e90565b935050606086015167ffffffffffffffff81111561400b575f5ffd5b61401788828901613e90565b92505061402660808701613ef9565b90509295509295909350565b5f5f60408385031215614043575f5ffd5b825161404e8161341f565b6020939093015192949293505050565b5f60ff83168061407057614070613968565b8060ff84160691505092915050565b805169ffffffffffffffffffff811681146139e2575f5ffd5b5f5f5f5f5f60a086880312156140ac575f5ffd5b6140b58661407f565b602087015160408801516060890151929750909550935091506140266080870161407f565b5f612aeb8383613ca956fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220a78ce1e692b2b1093066dcba46677ff33d6a895121056991e79b4afcac80cad264736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506141968061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106101e7575f3560e01c806394e35d9e11610109578063cd377c531161009e578063f04da65b1161006e578063f04da65b14610680578063f9839d89146106c7578063fdcb606814610709578063fe7d0c5414610739575f5ffd5b8063cd377c53146105ba578063cfad0a32146105e2578063d5002f2e14610609578063eb7aac5f14610630575f5ffd5b8063ad33ddd0116100d9578063ad33ddd014610577578063adc9d1f71461058a578063b718136114610592578063b85780bc146105a7575f5ffd5b806394e35d9e146104df57806396d648791461050757806399eeca4914610551578063a52aefd414610564575f5ffd5b806338c269eb1161017f578063782513bd1161014f578063782513bd1461045d578063847da7be1461047d5780638db9653f1461049e5780638fb36037146104a6575f5ffd5b806338c269eb146103655780634ea3e343146103a0578063725c9c49146103c257806377dc3429146103f2575f5ffd5b806323bafad7116101ba57806323bafad7146102bd57806327f38113146102f857806331da6b131461030e5780633335221014610345575f5ffd5b80630baaa34d146101eb5780630d1266271461024557806310d3d22e146102685780631978a5ed1461028c575b5f5ffd5b6102326101f9366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602052604090205490565b6040519081526020015b60405180910390f35b61025861025336600461348c565b610783565b604051901515815260200161023c565b61027b610276366004613471565b610892565b60405161023c959493929190613528565b5f5160206141415f395f51905f52546001600160a01b03165b6040516001600160a01b03909116815260200161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f5460405167ffffffffffffffff909116815260200161023c565b6103006108b4565b60405161023c9291906135bd565b61023261031c366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f52602052604090206009015490565b610358610353366004613471565b610a5c565b60405161023c91906136af565b610378610373366004613471565b610f1d565b604080519586526020860194909452928401919091526060830152608082015260a00161023c565b6103b36103ae366004613471565b611018565b60405161023c9392919061380d565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c84546001600160a01b03166102a5565b610258610400366004613843565b7fffffffff00000000000000000000000000000000000000000000000000000000165f9081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316151590565b61047061046b366004613471565b611167565b60405161023c9190613882565b61049061048b366004613471565b61121f565b60405161023c929190613894565b61023261134a565b6104ae6113b7565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161023c565b6104f26104ed366004613471565b611412565b6040805192835260208301919091520161023c565b610258610515366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b602052604090205460011490565b61025861055f3660046138c4565b6114ed565b6102586105723660046138f0565b611566565b6104f2610585366004613471565b611639565b61049061164d565b61059a6117a1565b60405161023c919061390c565b6104906105b5366004613471565b611810565b6105c26118f3565b6040805167ffffffffffffffff909316835260208301919091520161023c565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8054610232565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8154610232565b61066e61063e366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f5260205260409020546301000000900460ff1690565b60405160ff909116815260200161023c565b61023261068e366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c83602052604090205490565b6102586106d5366004613471565b6001600160a01b03165f9081525f5160206141215f395f51905f526020526040902054640100000000900460ff1660011490565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d546001600160a01b03166102a5565b610258610747366004613471565b6001600160a01b03165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604090205460011490565b5f80826002811115610797576107976134c6565b14806107b4575060018260028111156107b2576107b26134c6565b145b1561085e576001600160a01b0383165f9081525f5160206141215f395f51905f526020526040812080549091630100000090910460ff169003610823576040517f373f15fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836002811115610836576108366134c6565b0361084c5754610100900460ff1615905061088c565b5462010000900460ff1615905061088c565b5f5160206141415f395f51905f525474010000000000000000000000000000000000000000900460ff161590505b92915050565b5f5f60608060606108a286611974565b939a9299509097509550909350915050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c825460609081905f5160206141415f395f51905f52905f9067ffffffffffffffff8111156109045761090461391e565b60405190808252806020026020018201604052801561092d578160200160208202803683370190505b50600d8301549091505f9067ffffffffffffffff8111156109505761095061391e565b604051908082528060200260200182016040528015610979578160200160208202803683370190505b5090505f5b600d840154811015610a515783600d01818154811061099f5761099f613932565b905f5260205f20015f9054906101000a90046001600160a01b03168382815181106109cc576109cc613932565b60200260200101906001600160a01b031690816001600160a01b03168152505083600e015f85600d018381548110610a0657610a06613932565b5f9182526020808320909101546001600160a01b031683528201929092526040019020548251839083908110610a3e57610a3e613932565b602090810291909101015260010161097e565b509094909350915050565b610a646133bf565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602090815260409182902082516101c081018452815460ff80821683526101008204811683860152620100008204811683870152630100000082048116606084015264010000000082041660808301526501000000000090046001600160d81b031660a08201526001820180548551818602810186019096528086529194929360c08601939290830182828015610b6757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610b225790505b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610bdf57602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610bab5790505b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610c6857602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020019060080190602082600701049283019260010382029150808411610c235790505b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610ce057602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f8301819004938401936001036008909301929092029101808411610cac5790505b50505050508152602001600582018054610cf990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2590613946565b8015610d705780601f10610d4757610100808354040283529160200191610d70565b820191905f5260205f20905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600682018054610d8990613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590613946565b8015610e005780601f10610dd757610100808354040283529160200191610e00565b820191905f5260205f20905b815481529060010190602001808311610de357829003601f168201915b50505050508152602001600782016040518060400160405290815f8201805480602002602001604051908101604052809291908181526020018280548015610e6f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e51575b50505050508152602001600182018054610e8890613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb490613946565b8015610eff5780601f10610ed657610100808354040283529160200191610eff565b820191905f5260205f20905b815481529060010190602001808311610ee257829003601f168201915b50505050508152505081526020016009820154815250509050919050565b5f80808080805f5160206141415f395f51905f526001600160a01b0388165f908152600591820160205260409020018054610f5790613946565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390613946565b8015610fce5780601f10610fa557610100808354040283529160200191610fce565b820191905f5260205f20905b815481529060010190602001808311610fb157829003601f168201915b50505050509050610fde81611a32565b9095509350610fed8782611b9f565b509250610ff981611d87565b85858561100585611e8a565b939b929a50909850965090945092505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f52602052604081208054606091829160ff161561114357600781018054604080516020808402820181019092528281526001939260088601928491908301828280156110a657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611088575b505050505091508080546110b990613946565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613946565b80156111305780601f1061110757610100808354040283529160200191611130565b820191905f5260205f20905b81548152906001019060200180831161111357829003601f168201915b5050505050905093509350935050611160565b5050604080515f8082528183019092526020810182815291935091505b9193909250565b6001600160a01b0381165f9081525f5160206141215f395f51905f526020526040902060060180546060919061119c90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546111c890613946565b80156112135780601f106111ea57610100808354040283529160200191611213565b820191905f5260205f20905b8154815290600101906020018083116111f657829003601f168201915b50505050509050919050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206003810180548451818502810185019095528085526060948594600485019284918301828280156112c757602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116112825790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561133957602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116113055790505b505050505090509250925050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f5160206141415f395f51905f52906b033b2e3c9fd0803ce8000000906113a7906001600160801b03600160801b82048116911661398c565b6113b191906139b7565b91505090565b5f5f5160206141415f395f51905f5254760100000000000000000000000000000000000000000000900460ff166113ed57505f90565b507f8fb360370000000000000000000000000000000000000000000000000000000090565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76546001600160a01b0382165f9081525f5160206141215f395f51905f526020526040812054909182915f5160206141415f395f51905f5291600160801b90046001600160801b0316906b033b2e3c9fd0803ce8000000906114a79083906501000000000090046001600160d81b031661398c565b6114b191906139b7565b60018301546b033b2e3c9fd0803ce8000000906114d89084906001600160801b031661398c565b6114e291906139b7565b935093505050915091565b5f807f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7d81858015611520576115206134c6565b801561152e5761152e6134c6565b81526020019081526020015f205f846001600160a01b03166001600160a01b031681526020019081526020015f205411905092915050565b6001600160a01b0382165f9081525f5160206141215f395f51905f52602052604081208054640100000000900460ff16158061163157506116318160060180546115af90613946565b80601f01602080910402602001604051908101604052809291908181526020018280546115db90613946565b80156116265780601f106115fd57610100808354040283529160200191611626565b820191905f5260205f20905b81548152906001019060200180831161160957829003601f168201915b505050505084611f56565b949350505050565b5f5f611644836120c7565b91509150915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7880546040805160208084028201810190925282815260609384935f5160206141415f395f51905f529391927f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c79929091849183018282801561171f57602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116116da5790505b505050505091508080548060200260200160405190810160405280929190818152602001828054801561179157602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f830181900493840193600103600890930192909202910180841161175d5790505b5050505050905092509250509091565b60605f5160206141415f395f51905f5260020180548060200260200160405190810160405280929190818152602001828054801561180657602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116117e8575b5050505050905090565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260209081526040918290206001810180548451818502810185019095528085526060948594600285019284918301828280156112c7575f918252602091829020805467ffffffffffffffff1684529082028301929091600891018084116112825790505050505050915080805480602002602001604051908101604052809291908181526020018280548015611339575f918252602091829020805460070b8452908202830192909160089101808411611305579050505050505090509250925050915091565b5f5160206141415f395f51905f5280545f91829160ff7501000000000000000000000000000000000000000000909104166001190161195e576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119666123fc565b509296919550909350505050565b5f80606080806108a25f5160206141415f395f51905f526001600160a01b0388165f9081526005918201602052604090200180546119b190613946565b80601f01602080910402602001604051908101604052809291908181526020018280546119dd90613946565b8015611a285780601f106119ff57610100808354040283529160200191611a28565b820191905f5260205f20905b815481529060010190602001808311611a0b57829003601f168201915b50505050506129a9565b5f5f5f5f5f5f5f611a42886129a9565b9398509196509450925090506001856009811115611a6257611a626134c6565b03611aec575f83806020019051810190611a7c91906139ca565b9050806001600160a01b0316634cb44a766040518163ffffffff1660e01b81526004016040805180830381865afa158015611ab9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611add91906139e5565b97509750505050505050915091565b5f5f82806020019051810190611b029190613a22565b915091505f611b1d88888888876001600160801b03166129c4565b909a50670de0b6b3a764000099509050611b406001600160801b0383168a613a53565b611b4a908261398c565b611b5c670de0b6b3a76400008c61398c565b1015611b865780611b75670de0b6b3a76400008c61398c565b611b7f91906139b7565b9850611b92565b808a1015611b92578099505b5050505050505050915091565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c77805460408051602080840282018101909252828152670de0b6b3a7640000935f935f5160206141415f395f51905f52938593929190830182828015611c2c57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c0e575b505083519394505f925050505b81811015611d7c575f670de0b6b3a76400009050886001600160a01b0316848381518110611c6957611c69613932565b60200260200101516001600160a01b031614611d5857611d4f856005015f868581518110611c9957611c99613932565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f206005018054611cce90613946565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfa90613946565b8015611d455780601f10611d1c57610100808354040283529160200191611d45565b820191905f5260205f20905b815481529060010190602001808311611d2857829003601f168201915b5050505050611a32565b9150611d679050565b611d6188611a32565b90965090505b86811015611d73578096505b50600101611c39565b505050509250929050565b5f5f5f5f5f5f611d96876129a9565b9398509196509450925090506001856009811115611db657611db66134c6565b03611e3e575f83806020019051810190611dd091906139ca565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e329190613a66565b98975050505050505050565b5f81806020019051810190611e539190613a22565b5090505f611e6d87878787866001600160801b03166129c4565b909850905087811015611e7e578097505b50505050505050919050565b5f5f5f5f5f611e98866129a9565b50929650909450925090506001846009811115611eb757611eb76134c6565b03611f3e575f82806020019051810190611ed191906139ca565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f339190613a66565b979650505050505050565b611f4b848484845f6129c4565b509695505050505050565b5f5f5f84806020019051810190611f6d9190613b1a565b915091505f611f865f5160206141415f395f51905f5290565b6008015f848015611f9957611f996134c6565b8015611fa757611fa76134c6565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611fe75760019250505061088c565b8051156120bd575f828015611ffe57611ffe6134c6565b036120bd575f8180602001905181019061201891906139ca565b90506001600160a01b038116156120bb576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561208d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120b19190613b68565b935050505061088c565b505b505f949350505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f545f9081905f5160206141415f395f51905f529067ffffffffffffffff16820361213e576040517fe724de1a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f90815260058201602052604081209061216186612a61565b90505f6121f783600501805461217690613946565b80601f01602080910402602001604051908101604052809291908181526020018280546121a290613946565b80156121ed5780601f106121c4576101008083540402835291602001916121ed565b820191905f5260205f20905b8154815290600101906020018083116121d057829003601f168201915b5050505050611e8a565b90505f61228d84600501805461220c90613946565b80601f016020809104026020016040519081016040528092919081815260200182805461223890613946565b80156122835780601f1061225a57610100808354040283529160200191612283565b820191905f5260205f20905b81548152906001019060200180831161226657829003601f168201915b5050505050611d87565b90505f6122c78461229e8585612b1b565b6122a8919061398c565b86546122bf906301000000900460ff166012613b87565b60125f612b2d565b600187015486549192505f916b033b2e3c9fd0803ce80000009161230e91600160801b9091046001600160801b0316906501000000000090046001600160d81b031661398c565b61231891906139b7565b600a8801549091505f9067ffffffffffffffff1661233a633b9aca008561398c565b61234491906139b7565b90508181116123665760405163493df25360e01b815260040160405180910390fd5b6123708282613a53565b600a890154909950612396908a906123919067ffffffffffffffff16612ba6565b612b1b565b9850885f036123b85760405163493df25360e01b815260040160405180910390fd5b6123ed846123ce670de0b6b3a76400008c61398c565b6123d891906139b7565b88546012906301000000900460ff165f612b2d565b99505050505050505050915091565b5f8060608080835f5160206141415f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561246b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161244d575b505050505090505f815190505f8167ffffffffffffffff8111156124915761249161391e565b6040519080825280602002602001820160405280156124ba578160200160208202803683370190505b5095505f5b8281101561258c57856005015f8583815181106124de576124de613932565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff16900361251c5761251582613ba0565b9150612566565b856005015f85838151811061253357612533613932565b6020908102919091018101516001600160a01b031682528101919091526040015f20600701546125639083613bb8565b91505b8187828151811061257957612579613932565b60209081029190910101526001016124bf565b508067ffffffffffffffff8111156125a6576125a661391e565b6040519080825280602002602001820160405280156125cf578160200160208202803683370190505b5096508067ffffffffffffffff8111156125eb576125eb61391e565b604051908082528060200260200182016040528015612614578160200160208202803683370190505b5097505f5f5b83811015612935575f876005015f87848151811061263a5761263a613932565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff16156127d857606061270383600701600101805461268290613946565b80601f01602080910402602001604051908101604052809291908181526020018280546126ae90613946565b80156126f95780601f106126d0576101008083540402835291602001916126f9565b820191905f5260205f20905b8154815290600101906020018083116126dc57829003601f168201915b5050505050612c1a565b81519093509091505f5b818110156127c4576007850180548290811061272b5761272b613932565b5f918252602090912001546001600160a01b03168f61274a838a613bb8565b8151811061275a5761275a613932565b60200260200101906001600160a01b031690816001600160a01b03168152505082818151811061278c5761278c613932565b60200260200101518e82896127a19190613bb8565b815181106127b1576127b1613932565b602090810291909101015260010161270d565b506127cf8187613bb8565b955050506128cd565b8683815181106127ea576127ea613932565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612838573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061285c9190613a66565b905086838151811061287057612870613932565b60200260200101518c858151811061288a5761288a613932565b6001600160a01b0390921660209283029190910190910152808b856128ae81613ba0565b9650815181106128c0576128c0613932565b6020026020010181815250505b5f6128e083600501805461217690613946565b8354909150670de0b6b3a7640000906129079084906301000000900460ff1660125f612b2d565b612911908361398c565b61291b91906139b7565b612925908a613bb8565b985050505080600101905061261a565b5050600180860154612969916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612cbe565b985088156129915761298a61298585633b9aca008c6001612cbe565b612d09565b995061299d565b67ffffffffffffffff99505b50505050509091929394565b5f5f6060806060858060200190518101906108a29190613bd9565b5f5f6129d986670de0b6b3a764000086612d60565b90506129e6878287612d60565b91506129fa670de0b6b3a76400008361398c565b612a0c84670de0b6b3a7640000613a53565b612a16908361398c565b108015612a4e5750612a3083670de0b6b3a7640000613bb8565b612a3a908261398c565b612a4c670de0b6b3a76400008461398c565b105b15612a57578091505b9550959350505050565b6001600160a01b0381165f9081525f5160206141215f395f51905f5260205260408120805460ff1615612aac57612aa381600701600101805461268290613946565b9250612b159050565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015612aee573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b129190613a66565b91505b50919050565b5f8282188284100282185b9392505050565b5f8260ff168460ff161115612b69575f612b478486613c88565b612b5290600a613d84565b9050612b618660018386612cbe565b915050611631565b8260ff168460ff161015612b9d57612b818484613c88565b612b8c90600a613d84565b612b96908661398c565b9050611631565b50929392505050565b5f5f5f612bb16123fc565b505050915091508367ffffffffffffffff168267ffffffffffffffff1611612bec5760405163493df25360e01b815260040160405180910390fd5b67ffffffffffffffff80851690612c069082908516613a53565b612c10908361398c565b61163191906139b7565b60605f5f5f612c288561315f565b90925090505f828015612c3d57612c3d6134c6565b03612cb75780806020019051810190612c5691906139ca565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015612c90573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114e29190810190613db5565b5050915091565b5f612ceb612ccb83613180565b8015612ce657505f8480612ce157612ce16139a3565b868809115b151590565b612cf68686866131ac565b612d009190613bb8565b95945050505050565b5f67ffffffffffffffff821115612d5c57604080517f6dfcc65000000000000000000000000000000000000000000000000000000000815260048101919091526024810183905260440160405180910390fd5b5090565b5f80846009811115612d7457612d746134c6565b03612e44575f5f5f5f5f86806020019051810190612d929190613f42565b945094509450945094505f612da7828a61325c565b86519091505f5b81811015612e3457612e2a83898381518110612dcc57612dcc613932565b6020026020010151888481518110612de657612de6613932565b6020026020010151888581518110612e0057612e00613932565b602002602001015160ff168b8681518110612e1d57612e1d613932565b602002602001015161328b565b9250600101612dae565b5081975050505050505050612b26565b6003846009811115612e5857612e586134c6565b03612e6c5750670de0b6b3a7640000612b26565b6002846009811115612e8057612e806134c6565b03612e8c575081612b26565b6004846009811115612ea057612ea06134c6565b03612f3e576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f379190613a66565b9050612b26565b6005846009811115612f5257612f526134c6565b03612fa75773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6006846009811115612fbb57612fbb6134c6565b036130105773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b6007846009811115613024576130246134c6565b036130795773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f13573d5f5f3e3d5ffd5b600884600981111561308d5761308d6134c6565b036130b0575f828060200190518101906130a79190613a66565b9150612b269050565b60098460098111156130c4576130c46134c6565b03613157575f5f838060200190518101906130df919061406d565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613120573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131449190613a66565b61314e91906139b7565b92505050612b26565b509092915050565b5f6060828060200190518101906131769190613b1a565b9094909350915050565b5f6002826003811115613195576131956134c6565b61319f9190614099565b60ff166001149050919050565b5f5f5f6131b98686613392565b91509150815f036131dd578381816131d3576131d36139a3565b0492505050612b26565b8184116131f4576131f460038515026011186133ae565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f80836001811115613270576132706134c6565b036132845750670de0b6b3a764000061088c565b508061088c565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156132ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132ee91906140d3565b509350509250505f82131580613312575063ffffffff84166133108242613a53565b115b15613349576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff1660010361337c5761335f85600a614115565b613369838a61398c565b61337391906139b7565b92505050612d00565b8161338886600a614115565b613369908a61398c565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b604051806101c001604052805f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f60ff1681526020015f6001600160d81b0316815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200161344e604051806040016040528060608152602001606081525090565b81526020015f81525090565b6001600160a01b038116811461346e575f5ffd5b50565b5f60208284031215613481575f5ffd5b8135612b268161345a565b5f5f6040838503121561349d575f5ffd5b82356134a88161345a565b91506020830135600381106134bb575f5ffd5b809150509250929050565b634e487b7160e01b5f52602160045260245ffd5b600a81106134f657634e487b7160e01b5f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61353281876134da565b61353f60208201866134da565b60a060408201525f61355460a08301866134fa565b828103606084015261356681866134fa565b90508281036080840152611e3281856134fa565b5f8151808452602084019350602083015f5b828110156135b35781516001600160a01b031686526020958601959091019060010161358c565b5093949350505050565b604081525f6135cf604083018561357a565b82810360208401528084518083526020830191506020860192505f5b818110156136095783518352602093840193909201916001016135eb565b50909695505050505050565b5f8151808452602084019350602083015f5b828110156135b357815167ffffffffffffffff16865260209586019590910190600101613627565b5f8151808452602084019350602083015f5b828110156135b357815160070b865260209586019590910190600101613661565b5f815160408452613696604085018261357a565b905060208301518482036020860152612d0082826134fa565b602081526136c360208201835160ff169052565b5f60208301516136d8604084018260ff169052565b50604083015160ff8116606084015250606083015160ff8116608084015250608083015160ff811660a08401525060a08301516001600160d81b03811660c08401525060c08301516101c060e08401526137366101e0840182613615565b905060e0840151601f1984830301610100850152613754828261364f565b915050610100840151601f19848303016101208501526137748282613615565b915050610120840151601f1984830301610140850152613794828261364f565b915050610140840151601f19848303016101608501526137b482826134fa565b915050610160840151601f19848303016101808501526137d482826134fa565b915050610180840151601f19848303016101a08501526137f48282613682565b9150506101a08401516101c08401528091505092915050565b8315158152606060208201525f613827606083018561357a565b828103604084015261383981856134fa565b9695505050505050565b5f60208284031215613853575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612b26575f5ffd5b602081525f612b2660208301846134fa565b604081525f6138a66040830185613615565b8281036020840152612d00818561364f565b6001811061346e575f5ffd5b5f5f604083850312156138d5575f5ffd5b82356138e0816138b8565b915060208301356134bb8161345a565b5f5f60408385031215613901575f5ffd5b82356138e08161345a565b602081525f612b26602083018461357a565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b600181811c9082168061395a57607f821691505b602082108103612b1557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761088c5761088c613978565b634e487b7160e01b5f52601260045260245ffd5b5f826139c5576139c56139a3565b500490565b5f602082840312156139da575f5ffd5b8151612b268161345a565b5f5f604083850312156139f6575f5ffd5b505080516020909101519092909150565b80516001600160801b0381168114613a1d575f5ffd5b919050565b5f5f60408385031215613a33575f5ffd5b613a3c83613a07565b9150613a4a60208401613a07565b90509250929050565b8181038181111561088c5761088c613978565b5f60208284031215613a76575f5ffd5b5051919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613aa657613aa661391e565b604052919050565b5f82601f830112613abd575f5ffd5b815167ffffffffffffffff811115613ad757613ad761391e565b613aea601f8201601f1916602001613a7d565b818152846020838601011115613afe575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f60408385031215613b2b575f5ffd5b8251613b36816138b8565b602084015190925067ffffffffffffffff811115613b52575f5ffd5b613b5e85828601613aae565b9150509250929050565b5f60208284031215613b78575f5ffd5b81518015158114612b26575f5ffd5b60ff818116838216019081111561088c5761088c613978565b5f60018201613bb157613bb1613978565b5060010190565b8082018082111561088c5761088c613978565b8051600a8110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613bed575f5ffd5b613bf686613bcb565b9450613c0460208701613bcb565b9350604086015167ffffffffffffffff811115613c1f575f5ffd5b613c2b88828901613aae565b935050606086015167ffffffffffffffff811115613c47575f5ffd5b613c5388828901613aae565b925050608086015167ffffffffffffffff811115613c6f575f5ffd5b613c7b88828901613aae565b9150509295509295909350565b60ff828116828216039081111561088c5761088c613978565b6001815b6001841115613cdc57808504811115613cc057613cc0613978565b6001841615613cce57908102905b60019390931c928002613ca5565b935093915050565b5f82613cf25750600161088c565b81613cfe57505f61088c565b8160018114613d145760028114613d1e57613d3a565b600191505061088c565b60ff841115613d2f57613d2f613978565b50506001821b61088c565b5060208310610133831016604e8410600b8410161715613d5d575081810a61088c565b613d695f198484613ca1565b805f1904821115613d7c57613d7c613978565b029392505050565b5f612b2660ff841683613ce4565b5f67ffffffffffffffff821115613dab57613dab61391e565b5060051b60200190565b5f5f60408385031215613dc6575f5ffd5b825167ffffffffffffffff811115613ddc575f5ffd5b8301601f81018513613dec575f5ffd5b8051613dff613dfa82613d92565b613a7d565b8082825260208201915060208360051b850101925087831115613e20575f5ffd5b6020840193505b82841015613e42578351825260209384019390910190613e27565b6020969096015195979596505050505050565b5f82601f830112613e64575f5ffd5b8151613e72613dfa82613d92565b8082825260208201915060208360051b860101925085831115613e93575f5ffd5b602085015b83811015613ec157805163ffffffff81168114613eb3575f5ffd5b835260209283019201613e98565b5095945050505050565b5f82601f830112613eda575f5ffd5b8151613ee8613dfa82613d92565b8082825260208201915060208360051b860101925085831115613f09575f5ffd5b602085015b83811015613ec157805160ff81168114613f26575f5ffd5b835260209283019201613f0e565b805160028110613a1d575f5ffd5b5f5f5f5f5f60a08688031215613f56575f5ffd5b855167ffffffffffffffff811115613f6c575f5ffd5b8601601f81018813613f7c575f5ffd5b8051613f8a613dfa82613d92565b8082825260208201915060208360051b85010192508a831115613fab575f5ffd5b6020840193505b82841015613fd6578351613fc58161345a565b825260209384019390910190613fb2565b80985050505050602086015167ffffffffffffffff811115613ff6575f5ffd5b61400288828901613e55565b945050604086015167ffffffffffffffff81111561401e575f5ffd5b61402a88828901613ecb565b935050606086015167ffffffffffffffff811115614046575f5ffd5b61405288828901613ecb565b92505061406160808701613f34565b90509295509295909350565b5f5f6040838503121561407e575f5ffd5b82516140898161345a565b6020939093015192949293505050565b5f60ff8316806140ab576140ab6139a3565b8060ff84160691505092915050565b805169ffffffffffffffffffff81168114613a1d575f5ffd5b5f5f5f5f5f60a086880312156140e7575f5ffd5b6140f0866140ba565b60208701516040880151606089015192975090955093509150614061608087016140ba565b5f612b268383613ce456fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220cc720503cba65ec48a964f06a1ecc2a5687568f2960c4aee23790dec0155749564736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -804,7 +817,7 @@ "getSlippageTolerance(address)": { "details": "Maximum slippage tolerance is 1e9 (100%)" }, - "getSurplusBufferRatio()": { + "getSwapRouter()": { "details": "Expressed in base 1e9, and always >= 1e9" }, "isConsumingScheduledOp()": { @@ -823,9 +836,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3346200", - "executionCost": "3721", - "totalCost": "3349921" + "codeDepositCost": "3358000", + "executionCost": "3737", + "totalCost": "3361737" }, "external": { "accessManager()": "2418", @@ -847,7 +860,8 @@ "getShares(address)": "2561", "getSlippageTolerance(address)": "2564", "getStablecoinCap(address)": "infinite", - "getSurplusBufferRatio()": "2356", + "getSurplusBufferRatio()": "2334", + "getSwapRouter()": "2420", "getTotalIssued()": "infinite", "getTotalShares()": "2369", "isConsumingScheduledOp()": "infinite", @@ -862,7 +876,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSurplusBufferRatio()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSurplusBufferRatio()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processing\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x04f12ddeb53bb3bba9aaf9a93c62a84076cca496642d4d87556b15120b60e07b\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0xd53f1dc85e3e3b30205017bf00b54c9b511963034d382ecc647e65ad854b314e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SurplusBufferRatioNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroSurplusAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"accessManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralBurnFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"isManaged\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isMintLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"isBurnLive\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"onlyWhitelisted\",\"type\":\"uint8\"},{\"internalType\":\"uint216\",\"name\":\"normalizedStables\",\"type\":\"uint216\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"},{\"internalType\":\"uint64[]\",\"name\":\"xFeeBurn\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeBurn\",\"type\":\"int64[]\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinCap\",\"type\":\"uint256\"}],\"internalType\":\"struct Collateral\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralMintFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xFeeMint\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yFeeMint\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"collatRatio\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralSurplus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralSurplus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableSurplus\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getCollateralWhitelistData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getIssuedByCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stablecoinsFromCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stablecoinsIssued\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastReleasedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getManagerData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"enum OracleReadType\",\"name\":\"oracleType\",\"type\":\"uint8\"},{\"internalType\":\"enum OracleReadType\",\"name\":\"targetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"oracleData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"targetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hyperparameters\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getOracleValues\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"mint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"burn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ratio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"redemption\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPayees\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRedemptionFees\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"xRedemptionCurve\",\"type\":\"uint64[]\"},{\"internalType\":\"int64[]\",\"name\":\"yRedemptionCurve\",\"type\":\"int64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"getShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getSlippageTolerance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"getStablecoinCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSurplusBufferRatio\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalIssued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConsumingScheduledOp\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"enum ActionType\",\"name\":\"action\",\"type\":\"uint8\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrusted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isTrustedSeller\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"isValidSelector\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"isWhitelistedCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum WhitelistType\",\"name\":\"whitelistType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isWhitelistedForType\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenP\",\"outputs\":[{\"internalType\":\"contract ITokenP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"There may be duplicates in the info provided by the getters defined hereThis contract is an authorized fork of Angle's `Getters` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{\"getCollateralRatio()\":{\"details\":\"This function may revert and overflow if the collateral ratio is too big due to a too small amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function become economically impossible\"},\"getCollateralSurplus(address)\":{\"params\":{\"collateral\":\"The collateral address to compute the surplus of.\"},\"returns\":{\"collateralSurplus\":\"The collateral surplus amount.\",\"stableSurplus\":\"The surplus in stable amount.\"}},\"getOracle(address)\":{\"returns\":{\"oracleData\":\"Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\",\"oracleType\":\"Type of oracle (Chainlink, external smart contract, ...)\",\"targetData\":\"Extra data needed to read the target price of the asset\",\"targetType\":\"Type passed to read the value of the target price\"}},\"getOracleValues(address)\":{\"details\":\"This function is not optimized for gas consumption as for instance the `burn` value for collateral is computed twice: once in `readBurn` and once in `getBurnOracle`\",\"returns\":{\"burn\":\"Oracle value that will be used for `collateral` for a burn transaction. This value is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\",\"minRatio\":\"Minimum ratio across all collateral assets between a collateral burn price and its target price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn transactions.\",\"mint\":\"Oracle value to be used for a mint transaction with `collateral`\",\"ratio\":\"Ratio, in base `10**18` between the oracle value of the `collateral` and its target price. This value is 10**18 if the oracle is greater than the collateral price\",\"redemption\":\"Oracle value that would be used to price `collateral` when computing the collateral ratio during a redemption\"}},\"getSlippageTolerance(address)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)\"},\"getSwapRouter()\":{\"details\":\"Expressed in base 1e9, and always >= 1e9\"},\"isConsumingScheduledOp()\":{\"details\":\"Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.\"},\"isWhitelistedForCollateral(address,address)\":{\"details\":\"This function is non view as it may consult external non view functions from whitelist providers\"},\"isWhitelistedForType(uint8,address)\":{\"details\":\"Note that ultimately whitelisting may depend as well on external providers\"}},\"title\":\"Getters\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"accessManager()\":{\"notice\":\"Returns the address of the `accessManager` contract\"},\"getCollateralBurnFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn for `collateral`\"},\"getCollateralDecimals(address)\":{\"notice\":\"Returns the decimals of a given `collateral`\"},\"getCollateralInfo(address)\":{\"notice\":\"Returns all the info in storage associated to a `collateral`\"},\"getCollateralList()\":{\"notice\":\"Returns the list of collateral assets supported by the system\"},\"getCollateralMintFees(address)\":{\"notice\":\"Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint with `collateral`\"},\"getCollateralRatio()\":{\"notice\":\"Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount of stablecoins issued\"},\"getCollateralSurplus(address)\":{\"notice\":\"Computes the surplus of a collateral.\"},\"getCollateralWhitelistData(address)\":{\"notice\":\"Gets the data needed to deal with whitelists for `collateral`\"},\"getIssuedByCollateral(address)\":{\"notice\":\"Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued through Parallelizer\"},\"getLastReleasedAt()\":{\"notice\":\"Returns the last time the income was released to the payees\"},\"getManagerData(address)\":{\"notice\":\"Returns if a collateral is \\\"managed\\\" and the associated manager configuration\"},\"getOracle(address)\":{\"notice\":\"Returns the data used to compute oracle values for `collateral`\"},\"getOracleValues(address)\":{\"notice\":\"Returns the oracle values associated to `collateral`\"},\"getPayees()\":{\"notice\":\"Returns the payees and their shares\"},\"getRedemptionFees()\":{\"notice\":\"Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral ratio when users come to redeem\"},\"getShares(address)\":{\"notice\":\"Returns the shares of a payee\"},\"getSlippageTolerance(address)\":{\"notice\":\"Returns the slippage tolerance for a `collateral` for the surplus\"},\"getStablecoinCap(address)\":{\"notice\":\"Returns the stablecoin cap for `collateral`\"},\"getSwapRouter()\":{\"notice\":\"Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"getTotalIssued()\":{\"notice\":\"Returns the total amount of stablecoins issued through Parallelizer\"},\"getTotalShares()\":{\"notice\":\"Returns the total shares of the payees\"},\"isPaused(address,uint8)\":{\"notice\":\"Returns if the associated functionality is paused or not\"},\"isTrusted(address)\":{\"notice\":\"Returns if `sender` is trusted to update normalizers\"},\"isTrustedSeller(address)\":{\"notice\":\"Returns if `sender` is trusted to update sell rewards\"},\"isValidSelector(bytes4)\":{\"notice\":\"Checks whether a given `selector` is actually a valid selector corresponding to a function in one of the facets of the proxy\"},\"isWhitelistedCollateral(address)\":{\"notice\":\"Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForCollateral(address,address)\":{\"notice\":\"Checks whether `sender` can deal with `collateral` during burns and redemptions\"},\"isWhitelistedForType(uint8,address)\":{\"notice\":\"Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\"},\"tokenP()\":{\"notice\":\"Stablecoin minted by parallelizer\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Getters.sol\":\"Getters\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IGetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title IGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IGetters` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IGetters.sol\\ninterface IGetters {\\n /// @notice Checks whether a given `selector` is actually a valid selector corresponding to a function in one of\\n /// the\\n /// facets of the proxy\\n function isValidSelector(bytes4 selector) external view returns (bool);\\n\\n /// @notice Stablecoin minted by parallelizer\\n function tokenP() external view returns (ITokenP);\\n\\n /// @notice Returns the list of collateral assets supported by the system\\n function getCollateralList() external view returns (address[] memory);\\n\\n /// @notice Returns all the info in storage associated to a `collateral`\\n function getCollateralInfo(address collateral) external view returns (Collateral memory);\\n\\n /// @notice Returns the decimals of a given `collateral`\\n function getCollateralDecimals(address collateral) external view returns (uint8);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to mint\\n /// with `collateral`\\n function getCollateralMintFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays from which fees are computed when coming to burn\\n /// for `collateral`\\n function getCollateralBurnFees(address collateral) external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the `xFee` and `yFee` arrays used to compute the penalty factor depending on the collateral\\n /// ratio when users come to redeem\\n function getRedemptionFees() external view returns (uint64[] memory, int64[] memory);\\n\\n /// @notice Returns the collateral ratio of Parallelizer in base `10**9` and a rounded version of the total amount\\n /// of stablecoins issued\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued);\\n\\n /// @notice Returns the total amount of stablecoins issued through Parallelizer\\n function getTotalIssued() external view returns (uint256 stablecoinsIssued);\\n\\n /// @notice Returns the amount of stablecoins issued from `collateral` and the total amount of stablecoins issued\\n /// through Parallelizer\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued);\\n\\n /// @notice Returns if a collateral is \\\"managed\\\" and the associated manager configuration\\n function getManagerData(address collateral)\\n external\\n view\\n returns (bool isManaged, IERC20[] memory subCollaterals, bytes memory config);\\n\\n /// @notice Returns the oracle values associated to `collateral`\\n /// @return mint Oracle value to be used for a mint transaction with `collateral`\\n /// @return burn Oracle value that will be used for `collateral` for a burn transaction. This value\\n /// is then used along with oracle values for all other collateral assets to get a global burn value for the oracle\\n /// @return ratio Ratio, in base `10**18` between the oracle value of the `collateral` and its target price.\\n /// This value is 10**18 if the oracle is greater than the collateral price\\n /// @return minRatio Minimum ratio across all collateral assets between a collateral burn price and its target\\n /// price. This value is independent of `collateral` and is used to normalize the burn oracle value for burn\\n /// transactions.\\n /// @return redemption Oracle value that would be used to price `collateral` when computing the collateral ratio\\n /// during a redemption\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption);\\n\\n /// @notice Returns the data used to compute oracle values for `collateral`\\n /// @return oracleType Type of oracle (Chainlink, external smart contract, ...)\\n /// @return targetType Type passed to read the value of the target price\\n /// @return oracleData Extra data needed to read the oracle. For Chainlink oracles, this data is supposed to give\\n /// the addresses of the Chainlink feeds to read, the stale periods for each feed, ...\\n /// @return targetData Extra data needed to read the target price of the asset\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n );\\n\\n /// @notice Returns if the associated functionality is paused or not\\n function isPaused(address collateral, ActionType action) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update normalizers\\n function isTrusted(address sender) external view returns (bool);\\n\\n /// @notice Returns if `sender` is trusted to update sell rewards\\n function isTrustedSeller(address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` has a non null entry in the `isWhitelistedForType` storage mapping\\n /// @dev Note that ultimately whitelisting may depend as well on external providers\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool);\\n\\n /// @notice Checks whether `sender` can deal with `collateral` during burns and redemptions\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool);\\n\\n /// @notice Checks whether only whitelisted address can deal with `collateral` during burns and redemptions\\n function isWhitelistedCollateral(address collateral) external view returns (bool);\\n\\n /// @notice Gets the data needed to deal with whitelists for `collateral`\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory);\\n\\n /// @notice Returns the stablecoin cap for `collateral`\\n function getStablecoinCap(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the address of the `accessManager` contract\\n function accessManager() external view returns (address);\\n\\n /// @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\\n /// being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\\n /// attacker controlled calls.\\n function isConsumingScheduledOp() external view returns (bytes4);\\n\\n /// @notice Returns the payees and their shares\\n function getPayees() external view returns (address[] memory, uint256[] memory);\\n\\n /// @notice Returns the total shares of the payees\\n function getTotalShares() external view returns (uint256);\\n\\n /// @notice Returns the shares of a payee\\n function getShares(address payee) external view returns (uint256);\\n\\n /// @notice Returns the last time the income was released to the payees\\n function getLastReleasedAt() external view returns (uint256);\\n\\n /// @notice Returns the slippage tolerance for a `collateral` for the surplus\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n function getSlippageTolerance(address collateral) external view returns (uint256);\\n\\n /// @notice Returns the minimum collateral ratio that must hold after surplus processing\\n /// @dev Expressed in base 1e9, and always >= 1e9\\n /// @notice Returns the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n function getSwapRouter() external view returns (address);\\n\\n function getSurplusBufferRatio() external view returns (uint64);\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus);\\n}\\n\",\"keccak256\":\"0x27a333b02ba124b5964a63bddeb301328197bddbe98538903cd41a8b40900d12\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Getters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IGetters } from \\\"contracts/interfaces/IGetters.sol\\\";\\n\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibSurplus } from \\\"../libraries/LibSurplus.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Getters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev There may be duplicates in the info provided by the getters defined here\\n/// @dev This contract is an authorized fork of Angle's `Getters` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Getters.sol\\ncontract Getters is IGetters {\\n /// @inheritdoc IGetters\\n function isValidSelector(bytes4 selector) external view returns (bool) {\\n return s.diamondStorage().selectorInfo[selector].facetAddress != address(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function tokenP() external view returns (ITokenP) {\\n return s.transmuterStorage().tokenP;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralList() external view returns (address[] memory) {\\n return s.transmuterStorage().collateralList;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralInfo(address collateral) external view returns (Collateral memory) {\\n return s.transmuterStorage().collaterals[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralDecimals(address collateral) external view returns (uint8) {\\n return s.transmuterStorage().collaterals[collateral].decimals;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralMintFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeMint, int64[] memory yFeeMint)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeMint, collatInfo.yFeeMint);\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralBurnFees(address collateral)\\n external\\n view\\n returns (uint64[] memory xFeeBurn, int64[] memory yFeeBurn)\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.xFeeBurn, collatInfo.yFeeBurn);\\n }\\n\\n /// @inheritdoc IGetters\\n function getRedemptionFees()\\n external\\n view\\n returns (uint64[] memory xRedemptionCurve, int64[] memory yRedemptionCurve)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (ts.xRedemptionCurve, ts.yRedemptionCurve);\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function may revert and overflow if the collateral ratio is too big due to a too small\\n /// amount of `stablecoinsIssued`. Due to this, it is recommended to initialize the system with a non\\n /// negligible amount of `stablecoinsIssued` so DoS attacks on redemptions which use this function\\n /// become economically impossible\\n function getCollateralRatio() external view returns (uint64 collatRatio, uint256 stablecoinsIssued) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n\\n (collatRatio, stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n }\\n\\n /// @inheritdoc IGetters\\n function getIssuedByCollateral(address collateral)\\n external\\n view\\n returns (uint256 stablecoinsFromCollateral, uint256 stablecoinsIssued)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n return (\\n (uint256(ts.collaterals[collateral].normalizedStables) * _normalizer) / BASE_27,\\n (uint256(ts.normalizedStables) * _normalizer) / BASE_27\\n );\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalIssued() external view returns (uint256) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n return (uint256(ts.normalizedStables) * uint256(ts.normalizer)) / BASE_27;\\n }\\n\\n /// @inheritdoc IGetters\\n function getManagerData(address collateral) external view returns (bool, IERC20[] memory, bytes memory) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n return (true, collatInfo.managerData.subCollaterals, collatInfo.managerData.config);\\n }\\n return (false, new IERC20[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is not optimized for gas consumption as for instance the `burn` value for collateral\\n /// is computed twice: once in `readBurn` and once in `getBurnOracle`\\n function getOracleValues(address collateral)\\n external\\n view\\n returns (uint256 mint, uint256 burn, uint256 ratio, uint256 minRatio, uint256 redemption)\\n {\\n bytes memory oracleConfig = s.transmuterStorage().collaterals[collateral].oracleConfig;\\n (burn, ratio) = LibOracle.readBurn(oracleConfig);\\n (minRatio,) = LibOracle.getBurnOracle(collateral, oracleConfig);\\n return (LibOracle.readMint(oracleConfig), burn, ratio, minRatio, LibOracle.readRedemption(oracleConfig));\\n }\\n\\n /// @inheritdoc IGetters\\n function getOracle(address collateral)\\n external\\n view\\n returns (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n )\\n {\\n return LibOracle.getOracle(collateral);\\n }\\n\\n /// @inheritdoc IGetters\\n function isPaused(address collateral, ActionType action) external view returns (bool) {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (action == ActionType.Mint) {\\n return collatInfo.isMintLive == 0;\\n } else {\\n return collatInfo.isBurnLive == 0;\\n }\\n } else {\\n return s.transmuterStorage().isRedemptionLive == 0;\\n }\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrusted(address sender) external view returns (bool) {\\n return s.transmuterStorage().isTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isTrustedSeller(address sender) external view returns (bool) {\\n return s.transmuterStorage().isSellerTrusted[sender] == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedForType(WhitelistType whitelistType, address sender) external view returns (bool) {\\n return s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0;\\n }\\n\\n /// @inheritdoc IGetters\\n /// @dev This function is non view as it may consult external non view functions from whitelist providers\\n function isWhitelistedForCollateral(address collateral, address sender) external returns (bool) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n return (collatInfo.onlyWhitelisted == 0 || LibWhitelist.checkWhitelist(collatInfo.whitelistData, sender));\\n }\\n\\n /// @inheritdoc IGetters\\n function isWhitelistedCollateral(address collateral) external view returns (bool) {\\n return s.transmuterStorage().collaterals[collateral].onlyWhitelisted == 1;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralWhitelistData(address collateral) external view returns (bytes memory) {\\n return s.transmuterStorage().collaterals[collateral].whitelistData;\\n }\\n\\n /// @inheritdoc IGetters\\n function getStablecoinCap(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().collaterals[collateral].stablecoinCap;\\n }\\n\\n /// @inheritdoc IGetters\\n function accessManager() external view returns (address) {\\n return address(s.diamondStorage().accessManager);\\n }\\n\\n /// @inheritdoc IGetters\\n function isConsumingScheduledOp() external view returns (bytes4) {\\n return s.transmuterStorage().consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\\n }\\n\\n /// @inheritdoc IGetters\\n function getPayees() external view returns (address[] memory, uint256[] memory) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory payees = new address[](ts.payees.length);\\n uint256[] memory shares = new uint256[](ts.payees.length);\\n for (uint256 i = 0; i < ts.payees.length; i++) {\\n payees[i] = ts.payees[i];\\n shares[i] = ts.shares[ts.payees[i]];\\n }\\n return (payees, shares);\\n }\\n\\n /// @inheritdoc IGetters\\n function getTotalShares() external view returns (uint256) {\\n return s.transmuterStorage().totalShares;\\n }\\n\\n /// @inheritdoc IGetters\\n function getShares(address payee) external view returns (uint256) {\\n return s.transmuterStorage().shares[payee];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSlippageTolerance(address collateral) external view returns (uint256) {\\n return s.transmuterStorage().slippageTolerance[collateral];\\n }\\n\\n /// @inheritdoc IGetters\\n function getSwapRouter() external view returns (address) {\\n return s.transmuterStorage().swapRouter;\\n }\\n\\n /// @inheritdoc IGetters\\n function getSurplusBufferRatio() external view returns (uint64) {\\n return s.transmuterStorage().surplusBufferRatio;\\n }\\n\\n /// @inheritdoc IGetters\\n function getLastReleasedAt() external view returns (uint256) {\\n return s.transmuterStorage().lastReleasedAt;\\n }\\n\\n /// @inheritdoc IGetters\\n function getCollateralSurplus(address collateral)\\n external\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n return LibSurplus._computeCollateralSurplus(collateral);\\n }\\n}\\n\",\"keccak256\":\"0x7698420203383c245b91740b40652708e240877ec9d006d211556c7ffe0406e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -927,8 +941,8 @@ "getStablecoinCap(address)": { "notice": "Returns the stablecoin cap for `collateral`" }, - "getSurplusBufferRatio()": { - "notice": "Returns the minimum collateral ratio that must hold after surplus processing" + "getSwapRouter()": { + "notice": "Returns the minimum collateral ratio that must hold after surplus processingReturns the aggregator or DEX the `RewardHandler` forwards its swap payload to" }, "getTotalIssued()": { "notice": "Returns the total amount of stablecoins issued through Parallelizer" @@ -965,13 +979,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0xdc4b816f0a64ae9d9b1ab19a9471f1dd955c77f492c1e7197d11ead187fe9a77", - "nonce": "0xe5", + "hash": "0x58d8ea980d591440f4131e394a6268145ee16f93b483b334ae49eed0333c2dd7", + "nonce": "0x107", "origin": "0x66CcEC236bbcE5f1bBd1b2fC0a4014e57A55ad02" }, "receipt": { - "blockHash": "0x7a2290cb901673b6de6d10de2a15dc3d1270745b1377e95cc0b3b8141465f410", - "blockNumber": "0x186a79c", - "transactionIndex": "0x12" + "blockHash": "0x07c664c260caadecbdd0dbbd62738e21921ddc9145c2f871554e9dd344f63ea3", + "blockNumber": "0x18ef45f", + "transactionIndex": "0x10" } } \ No newline at end of file diff --git a/deployments/mainnet/Redeemer.json b/deployments/mainnet/Redeemer.json index 2d0a18e..4629727 100644 --- a/deployments/mainnet/Redeemer.json +++ b/deployments/mainnet/Redeemer.json @@ -1,5 +1,5 @@ { - "address": "0xb049d96b8fedd3eb8ec767b7a33bf95d3be128d0", + "address": "0x3607e2f9fca2f18a9a13225e61b68af7f9f8bc5c", "abi": [ { "inputs": [], @@ -78,6 +78,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "UnexpectedRedemptionTokens", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -179,6 +184,11 @@ "internalType": "uint256[]", "name": "minAmountOuts", "type": "uint256[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeem", @@ -224,6 +234,11 @@ "name": "forfeitTokens", "type": "address[]" }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" + }, { "internalType": "bytes", "name": "authData", @@ -272,6 +287,11 @@ "internalType": "address[]", "name": "forfeitTokens", "type": "address[]" + }, + { + "internalType": "bytes32", + "name": "expectedTokensHash", + "type": "bytes32" } ], "name": "redeemWithForfeit", @@ -317,8 +337,8 @@ ], "contractName": "Redeemer", "sourceName": "contracts/parallelizer/facets/Redeemer.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50613a5c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063815822c11161004d578063815822c1146100a5578063d703a0cd146100b8578063fd7daaf8146100cb575f5ffd5b80632e7639bc1461006857806356018dc014610092575b5f5ffd5b61007b610076366004612c7a565b6100ec565b604051610089929190612d76565b60405180910390f35b61007b6100a0366004612dc1565b61011a565b61007b6100b3366004612eae565b61013a565b61007b6100c6366004612f0d565b610190565b6100de6100d9366004612f31565b6101a7565b604051908152602001610089565b60608061010b878787878760405180602001604052805f815250610235565b915091505b9550959350505050565b60608061012b888888888888610235565b91509150965096945050505050565b606080610183868686865f60405190808252806020026020018201604052801561016e578160200160208202803683370190505b5060405180602001604052805f815250610235565b9150915094509492505050565b60608061019c836104e2565b509094909350915050565b5f6101b3335f36610793565b1580156101eb5750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610222576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61022c83836108cc565b90505b92915050565b5f516020613a075f395f51905f528054606091829160ff600160a81b909104166001190161028f576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613a075f395f51905f525474010000000000000000000000000000000000000000900460ff165f03610314576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8642111561034e576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a56040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8981526001600160a01b038916604082015260c0810187905260e081018690526103ce8a6104e2565b60a0840152608083018190526060830191909152875190511461041d576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104278a5f6108cc565b506104368a8a8a8a8a8a610c16565b6001600160a01b0316602082015261044d81610d14565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516104ad9493929190612f5f565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b1790559097909650945050505050565b60608060605f5f6104f1611134565b91985096509450909250905080861061051c5760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613a075f395f51905f52935f9391929091908301828280156105b757602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105835790505b505050505090505f633b9aca008567ffffffffffffffff16101561066b575f8360030180548060200260200160405190810160405280929190818152602001828054801561065557602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116106105790505b5050505050905061066786828561177b565b9150505b5f5b875181101561078657633b9aca008667ffffffffffffffff1610156106e35761069a633b9aca0086612fb1565b8267ffffffffffffffff168983815181106106b7576106b7612fc8565b60200260200101518c6106ca9190612fb1565b6106d49190612fb1565b6106de9190612ff0565b610761565b6106f767ffffffffffffffff871686612fb1565b83600185516107069190613003565b8151811061071657610716612fc8565b602002602001015167ffffffffffffffff1689838151811061073a5761073a612fc8565b60200260200101518c61074d9190612fb1565b6107579190612fb1565b6107619190612ff0565b88828151811061077357610773612fc8565b602090810291909101015260010161066d565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107e38388306107d56004868b8d613016565b6107de9161303d565b61191b565b91509150816108bd5763ffffffff8116156108b2575f516020613a075f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee90610873908b908b908b906004016130a3565b5f604051808303815f87803b15801561088a575f5ffd5b505af115801561089c573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108bd9050565b5f93505050506108c5565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613a075f395f51905f52906001600160801b03600160801b820481169116841561094a578061092f6b033b2e3c9fd0803ce800000088612fb1565b6109399190612ff0565b61094390836130e1565b9350610978565b806109616b033b2e3c9fd0803ce800000088612fb1565b61096b9190612ff0565b6109759083613003565b93505b670de0b6b3a76400008411158061099e57506ec097ce7bc90715b34b9f10000000008410155b15610b7c575f836002018054806020026020016040519081016040528092919081815260200182805480156109fa57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116109dc575b505050505090505f815190505f5f5b82811015610b2f575f610a9c6b033b2e3c9fd0803ce80000008a8a6005015f898781518110610a3a57610a3a612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610a8d91906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16612fb1565b610a979190612ff0565b6119f3565b9050610aa881846130f4565b9250806001600160801b0316886005015f878581518110610acb57610acb612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a09565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610b85846119f3565b6001840180546001600160801b03928316600160801b02921691909117905584158015610bbd575060018301546001600160801b0316155b15610bda5760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613a075f395f51905f525481515f916001600160a01b03169015610ca957610c46888888888888611a2f565b6040516315a38ec760e11b8152600481018a90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610c8e575f5ffd5b505af1158015610ca0573d5f5f3e3d5ffd5b50505050610d09565b6040516315a38ec760e11b815260048101899052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cf2575f5ffd5b505af1158015610d04573d5f5f3e3d5ffd5b505050505b509695505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613a075f395f51905f52935f939192909190830182828015610d9757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610d79575b505050505090505f5f84608001515190505f5b8181101561112c578560c001518181518110610dc857610dc8612fc8565b602002602001015186608001518281518110610de657610de6612fc8565b60200260200101511015610e26576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610e3d57610e3d612fc8565b6020026020010151118015610e7b57505f610e7987606001518381518110610e6757610e67612fc8565b60200260200101518860e00151611b4b565b125b156110e8575f856005015f868681518110610e9857610e98612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610f6d5750610f6b816006018054610ee590613113565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1190613113565b8015610f5c5780601f10610f3357610100808354040283529160200191610f5c565b820191905f5260205f20905b815481529060010190602001808311610f3f57829003601f168201915b50505050508860400151611ba7565b155b15610fa4576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff161561108a5761108587606001518381518110610fc757610fc7612fc8565b6020026020010151886040015189608001518581518110610fea57610fea612fc8565b602002602001015184600701600101805461100490613113565b80601f016020809104026020016040519081016040528092919081815260200182805461103090613113565b801561107b5780601f106110525761010080835404028352916020019161107b565b820191905f5260205f20905b81548152906001019060200180831161105e57829003601f168201915b5050505050611d18565b6110e6565b6110e68760400151886080015184815181106110a8576110a8612fc8565b6020026020010151896060015185815181106110c6576110c6612fc8565b60200260200101516001600160a01b0316611dd99092919063ffffffff16565b505b8060018760a00151858151811061110157611101612fc8565b60200260200101516111139190613003565b11611124576111218361314b565b92505b600101610daa565b505050505050565b5f8060608080835f516020613a075f395f51905f5290505f5f826002018054806020026020016040519081016040528092919081815260200182805480156111a357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611185575b505050505090505f815190505f8167ffffffffffffffff8111156111c9576111c9612b1b565b6040519080825280602002602001820160405280156111f2578160200160208202803683370190505b5095505f5b828110156112c457856005015f85838151811061121657611216612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112545761124d8261314b565b915061129e565b856005015f85838151811061126b5761126b612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461129b90836130e1565b91505b818782815181106112b1576112b1612fc8565b60209081029190910101526001016111f7565b508067ffffffffffffffff8111156112de576112de612b1b565b604051908082528060200260200182016040528015611307578160200160208202803683370190505b5096508067ffffffffffffffff81111561132357611323612b1b565b60405190808252806020026020018201604052801561134c578160200160208202803683370190505b5097505f5f5b83811015611707575f876005015f87848151811061137257611372612fc8565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561151057606061143b8360070160010180546113ba90613113565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613113565b80156114315780601f1061140857610100808354040283529160200191611431565b820191905f5260205f20905b81548152906001019060200180831161141457829003601f168201915b5050505050611e5e565b81519093509091505f5b818110156114fc576007850180548290811061146357611463612fc8565b5f918252602090912001546001600160a01b03168f611482838a6130e1565b8151811061149257611492612fc8565b60200260200101906001600160a01b031690816001600160a01b0316815250508281815181106114c4576114c4612fc8565b60200260200101518e82896114d991906130e1565b815181106114e9576114e9612fc8565b6020908102919091010152600101611445565b5061150781876130e1565b9550505061161e565b86838151811061152257611522612fc8565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611589573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ad9190613163565b90508683815181106115c1576115c1612fc8565b60200260200101518c85815181106115db576115db612fc8565b6001600160a01b0390921660209283029190910190910152808b856115ff8161314b565b96508151811061161157611611612fc8565b6020026020010181815250505b5f6116b283600501805461163190613113565b80601f016020809104026020016040519081016040528092919081815260200182805461165d90613113565b80156116a85780601f1061167f576101008083540402835291602001916116a8565b820191905f5260205f20905b81548152906001019060200180831161168b57829003601f168201915b5050505050611f0d565b8354909150670de0b6b3a7640000906116d99084906301000000900460ff1660125f611fce565b6116e39083612fb1565b6116ed9190612ff0565b6116f7908a6130e1565b9850505050806001019050611352565b505060018086015461173b916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce800000090612049565b985088156117635761175c61175785633b9aca008c6001612049565b61208b565b995061176f565b67ffffffffffffffff99505b50505050509091929394565b5f5f61178b6001856001886120c1565b9050801580156117c75750835f815181106117a8576117a8612fc8565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b156117ee57825f815181106117de576117de612fc8565b60200260200101519150506108c5565b600184516117fc9190613003565b81036118215782600185516118119190613003565b815181106117de576117de612fc8565b83818151811061183357611833612fc8565b60200260200101518482600161184991906130e1565b8151811061185957611859612fc8565b602002602001015161186b919061317a565b84828151811061187d5761187d612fc8565b602002602001015186611890919061317a565b8483815181106118a2576118a2612fc8565b6020026020010151858460016118b891906130e1565b815181106118c8576118c8612fc8565b60200260200101516118da919061319a565b6118e491906131c9565b6118ee91906131e8565b83828151811061190057611900612fc8565b60200260200101516119129190613225565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa156119e9575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a2b576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611a4591906132a1565b905087816020015114611a84576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611a9b825f01518a8a8a8a8a8860800151612256565b5f516020613a075f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b10959430949093928a9190600401613348565b5f604051808303815f87803b158015611b27575f5ffd5b505af1158015611b39573d5f5f3e3d5ffd5b505092519a9950505050505050505050565b80515f90815b81811015611b9c57838181518110611b6b57611b6b612fc8565b60200260200101516001600160a01b0316856001600160a01b031603611b9457915061022f9050565b600101611b51565b505f19949350505050565b5f5f5f84806020019051810190611bbe91906133c8565b915091505f611bd75f516020613a075f395f51905f5290565b6008015f848015611bea57611bea613416565b8015611bf857611bf8613416565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611c385760019250505061022f565b805115611d0e575f828015611c4f57611c4f613416565b03611d0e575f81806020019051810190611c69919061342a565b90506001600160a01b03811615611d0c576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611cde573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d029190613445565b935050505061022f565b505b505f949350505050565b5f5f611d2383612339565b90925090505f828015611d3857611d38613416565b0361112c5780806020019051810190611d51919061342a565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611dbb575f5ffd5b505af1158015611dcd573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611e5990849061235a565b505050565b60605f5f5f611e6c85612339565b90925090505f828015611e8157611e81613416565b03611f065780806020019051810190611e9a919061342a565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611ed4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611efb9190810190613460565b935093505050915091565b5050915091565b5f5f5f5f5f611f1b866123e5565b50929650909450925090506001846009811115611f3a57611f3a613416565b03611fc1575f82806020019051810190611f54919061342a565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f92573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fb69190613163565b979650505050505050565b610d09848484845f612412565b5f8260ff168460ff16111561200a575f611fe884866134fb565b611ff390600a6135f7565b90506120028660018386612049565b915050612041565b8260ff168460ff16101561203e5761202284846134fb565b61202d90600a6135f7565b6120379086612fb1565b9050612041565b50835b949350505050565b5f612076612056836124ad565b801561207157505f848061206c5761206c612fdc565b868809115b151590565b6120818686866124d9565b61191291906130e1565b5f67ffffffffffffffff821115611a2b57604080516306dfcc6560e41b8152600481019190915260248101839052604401611a22565b5f83515f036120d157505f612041565b8351600190868015612125575067ffffffffffffffff841685876120f6600185613003565b8151811061210657612106612fc8565b60200260200101516121189190613605565b67ffffffffffffffff1611155b8061217b57508615801561217b575067ffffffffffffffff8416858761214c600185613003565b8151811061215c5761215c612fc8565b602002602001015161216e9190613605565b67ffffffffffffffff1610155b156121945761218b600182613003565b92505050612041565b8082101561224b575f6121a78383612589565b9050876121ee578467ffffffffffffffff16868883815181106121cc576121cc612fc8565b60200260200101516121de9190613605565b67ffffffffffffffff161061222a565b8467ffffffffffffffff168688838151811061220c5761220c612fc8565b602002602001015161221e9190613605565b67ffffffffffffffff16115b1561223757809150612245565b6122428160016130e1565b92505b50612194565b611fb6600183613003565b5f7fcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a5f1b888888888860405160200161228f9190613628565b60405160208183030381529060405280519060200120886040516020016122b6919061365d565b60408051601f198184030181528282528051602091820120908301989098526001600160a01b0396871690820152606081019490945293909116608083015260a082015260c081019190915260e0810191909152610100810183905261012001604051602081830303815290604052805190602001209050979650505050505050565b5f60608280602001905181019061235091906133c8565b9094909350915050565b5f5f60205f8451602086015f885af180612379576040513d5f823e3d81fd5b50505f513d9150811561239057806001141561239d565b6001600160a01b0384163b155b156123df576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a22565b50505050565b5f5f60608060608580602001905181019061240091906136a3565b939a9299509097509550909350915050565b5f5f61242786670de0b6b3a7640000866125a3565b90506124348782876125a3565b9150612448670de0b6b3a764000083612fb1565b61245a84670de0b6b3a7640000613003565b6124649083612fb1565b10801561249c575061247e83670de0b6b3a76400006130e1565b6124889082612fb1565b61249a670de0b6b3a764000084612fb1565b105b156101105796879650945050505050565b5f60028260038111156124c2576124c2613416565b6124cc9190613745565b60ff166001149050919050565b5f5f5f6124e686866129a1565b91509150815f0361250a5783818161250057612500612fdc565b04925050506108c5565b8184116125215761252160038515026011186129bd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f6125976002848418612ff0565b61022c908484166130e1565b5f808460098111156125b7576125b7613416565b03612687575f5f5f5f5f868060200190518101906125d59190613849565b945094509450945094505f6125ea828a6129ce565b86519091505f5b818110156126775761266d8389838151811061260f5761260f612fc8565b602002602001015188848151811061262957612629612fc8565b602002602001015188858151811061264357612643612fc8565b602002602001015160ff168b868151811061266057612660612fc8565b60200260200101516129fd565b92506001016125f1565b50819750505050505050506108c5565b600384600981111561269b5761269b613416565b036126af5750670de0b6b3a76400006108c5565b60028460098111156126c3576126c3613416565b036126cf5750816108c5565b60048460098111156126e3576126e3613416565b03612781576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061277a9190613163565b90506108c5565b600584600981111561279557612795613416565b036127ea5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60068460098111156127fe576127fe613416565b036128535773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b600784600981111561286757612867613416565b036128bc5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612756573d5f5f3e3d5ffd5b60088460098111156128d0576128d0613416565b036128f3575f828060200190518101906128ea9190613163565b91506108c59050565b600984600981111561290757612907613416565b0361299a575f5f838060200190518101906129229190613974565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612963573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129879190613163565b6129919190612ff0565b925050506108c5565b50816108c5565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f808360018111156129e2576129e2613416565b036129f65750670de0b6b3a764000061022f565b508061022f565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612a3c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a6091906139b9565b509350509250505f82131580612a84575063ffffffff8416612a828242613003565b115b15612abb576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612aee57612ad185600a6139fb565b612adb838a612fb1565b612ae59190612ff0565b92505050611912565b81612afa86600a6139fb565b612adb908a612fb1565b6001600160a01b0381168114612b18575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612b5257612b52612b1b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612b8157612b81612b1b565b604052919050565b5f67ffffffffffffffff821115612ba257612ba2612b1b565b5060051b60200190565b5f82601f830112612bbb575f5ffd5b8135612bce612bc982612b89565b612b58565b8082825260208201915060208360051b860101925085831115612bef575f5ffd5b602085015b83811015612c0c578035835260209283019201612bf4565b5095945050505050565b5f82601f830112612c25575f5ffd5b8135612c33612bc982612b89565b8082825260208201915060208360051b860101925085831115612c54575f5ffd5b602085015b83811015612c0c578035612c6c81612b04565b835260209283019201612c59565b5f5f5f5f5f60a08688031215612c8e575f5ffd5b853594506020860135612ca081612b04565b935060408601359250606086013567ffffffffffffffff811115612cc2575f5ffd5b612cce88828901612bac565b925050608086013567ffffffffffffffff811115612cea575f5ffd5b612cf688828901612c16565b9150509295509295909350565b5f8151808452602084019350602083015f5b82811015612d3c5781516001600160a01b0316865260209586019590910190600101612d15565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612d3c578151865260209586019590910190600101612d58565b604081525f612d886040830185612d03565b82810360208401526119128185612d46565b5f67ffffffffffffffff821115612db357612db3612b1b565b50601f01601f191660200190565b5f5f5f5f5f5f60c08789031215612dd6575f5ffd5b863595506020870135612de881612b04565b945060408701359350606087013567ffffffffffffffff811115612e0a575f5ffd5b612e1689828a01612bac565b935050608087013567ffffffffffffffff811115612e32575f5ffd5b612e3e89828a01612c16565b92505060a087013567ffffffffffffffff811115612e5a575f5ffd5b8701601f81018913612e6a575f5ffd5b8035612e78612bc982612d9a565b8181528a6020838501011115612e8c575f5ffd5b816020840160208301375f602083830101528093505050509295509295509295565b5f5f5f5f60808587031215612ec1575f5ffd5b843593506020850135612ed381612b04565b925060408501359150606085013567ffffffffffffffff811115612ef5575f5ffd5b612f0187828801612bac565b91505092959194509250565b5f60208284031215612f1d575f5ffd5b5035919050565b8015158114612b18575f5ffd5b5f5f60408385031215612f42575f5ffd5b823591506020830135612f5481612f24565b809150509250929050565b848152608060208201525f612f776080830186612d03565b8281036040840152612f898186612d46565b90508281036060840152611fb68185612d03565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761022f5761022f612f9d565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f82612ffe57612ffe612fdc565b500490565b8181038181111561022f5761022f612f9d565b5f5f85851115613024575f5ffd5b83861115613030575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561309c577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561022f5761022f612f9d565b6001600160801b03818116838216019081111561022f5761022f612f9d565b600181811c9082168061312757607f821691505b60208210810361314557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161315c5761315c612f9d565b5060010190565b5f60208284031215613173575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561022f5761022f612f9d565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561022f5761022f612f9d565b5f8260070b8260070b028060070b915080821461309c5761309c612f9d565b5f8160070b8360070b806131fe576131fe612fdc565b677fffffffffffffff1982145f198214161561321c5761321c612f9d565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561022f5761022f612f9d565b5f82601f830112613263575f5ffd5b8151613271612bc982612d9a565b818152846020838601011115613285575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f602082840312156132b1575f5ffd5b815167ffffffffffffffff8111156132c7575f5ffd5b820160c081850312156132d8575f5ffd5b6132e0612b2f565b81516132eb81612b04565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff81111561332e575f5ffd5b61333a86828501613254565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b18575f5ffd5b5f5f604083850312156133d9575f5ffd5b82516133e4816133bc565b602084015190925067ffffffffffffffff811115613400575f5ffd5b61340c85828601613254565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561343a575f5ffd5b81516108c581612b04565b5f60208284031215613455575f5ffd5b81516108c581612f24565b5f5f60408385031215613471575f5ffd5b825167ffffffffffffffff811115613487575f5ffd5b8301601f81018513613497575f5ffd5b80516134a5612bc982612b89565b8082825260208201915060208360051b8501019250878311156134c6575f5ffd5b6020840193505b828410156134e85783518252602093840193909101906134cd565b6020969096015195979596505050505050565b60ff828116828216039081111561022f5761022f612f9d565b6001815b600184111561354f5780850481111561353357613533612f9d565b600184161561354157908102905b60019390931c928002613518565b935093915050565b5f826135655750600161022f565b8161357157505f61022f565b81600181146135875760028114613591576135ad565b600191505061022f565b60ff8411156135a2576135a2612f9d565b50506001821b61022f565b5060208310610133831016604e8410600b84101617156135d0575081810a61022f565b6135dc5f198484613514565b805f19048211156135ef576135ef612f9d565b029392505050565b5f61022c60ff841683613557565b67ffffffffffffffff818116838216029081169081811461309c5761309c612f9d565b81515f90829060208501835b82811015613652578151845260209384019390910190600101613634565b509195945050505050565b81515f90829060208501835b828110156136525781516001600160a01b0316845260209384019390910190600101613669565b8051600a811061369e575f5ffd5b919050565b5f5f5f5f5f60a086880312156136b7575f5ffd5b6136c086613690565b94506136ce60208701613690565b9350604086015167ffffffffffffffff8111156136e9575f5ffd5b6136f588828901613254565b935050606086015167ffffffffffffffff811115613711575f5ffd5b61371d88828901613254565b925050608086015167ffffffffffffffff811115613739575f5ffd5b612cf688828901613254565b5f60ff83168061375757613757612fdc565b8060ff84160691505092915050565b5f82601f830112613775575f5ffd5b8151613783612bc982612b89565b8082825260208201915060208360051b8601019250858311156137a4575f5ffd5b602085015b83811015612c0c57805163ffffffff811681146137c4575f5ffd5b8352602092830192016137a9565b5f82601f8301126137e1575f5ffd5b81516137ef612bc982612b89565b8082825260208201915060208360051b860101925085831115613810575f5ffd5b602085015b83811015612c0c57805160ff8116811461382d575f5ffd5b835260209283019201613815565b80516002811061369e575f5ffd5b5f5f5f5f5f60a0868803121561385d575f5ffd5b855167ffffffffffffffff811115613873575f5ffd5b8601601f81018813613883575f5ffd5b8051613891612bc982612b89565b8082825260208201915060208360051b85010192508a8311156138b2575f5ffd5b6020840193505b828410156138dd5783516138cc81612b04565b8252602093840193909101906138b9565b80985050505050602086015167ffffffffffffffff8111156138fd575f5ffd5b61390988828901613766565b945050604086015167ffffffffffffffff811115613925575f5ffd5b613931888289016137d2565b935050606086015167ffffffffffffffff81111561394d575f5ffd5b613959888289016137d2565b9250506139686080870161383b565b90509295509295909350565b5f5f60408385031215613985575f5ffd5b825161399081612b04565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461369e575f5ffd5b5f5f5f5f5f60a086880312156139cd575f5ffd5b6139d6866139a0565b60208701516040880151606089015192975090955093509150613968608087016139a0565b5f61022c838361355756fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220adec1ca214a5a3cf42d22772187300cfb66c2131f2ea0b391dd08d79bc15ddb564736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50613b148061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063d703a0cd1161004d578063d703a0cd146100a5578063f70125ab146100b8578063fd7daaf8146100cb575f5ffd5b80632c1918f914610068578063b521934614610092575b5f5ffd5b61007b610076366004612cf8565b6100ec565b604051610089929190612dfe565b60405180910390f35b61007b6100a0366004612e22565b61011b565b61007b6100b3366004612e88565b610174565b61007b6100c6366004612f13565b61018b565b6100de6100d9366004612fdc565b6101ad565b604051908152602001610089565b60608061010c88888888888860405180602001604052805f81525061023b565b91509150965096945050505050565b606080610165878787875f60405190808252806020026020018201604052801561014f578160200160208202803683370190505b508860405180602001604052805f81525061023b565b915091505b9550959350505050565b6060806101808361054d565b509094909350915050565b60608061019d8989898989898961023b565b9150915097509795505050505050565b5f6101b9335f366107fe565b1580156101f15750335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7b6020526040902054155b15610228576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102328383610937565b90505b92915050565b5f516020613abf5f395f51905f528054606091829160ff600160a81b9091041660011901610295576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781555f516020613abf5f395f51905f525474010000000000000000000000000000000000000000900460ff165f0361031a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87421115610354576040517fecdd1c2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103ab6040518061010001604052805f81526020015f6001600160a01b031681526020015f6001600160a01b0316815260200160608152602001606081526020016060815260200160608152602001606081525090565b8a81526001600160a01b038a16604082015260c0810188905260e081018790526103d48b61054d565b60a08401526080830181905260608301919091528851905114610423576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b858160600151604051602001610439919061300a565b6040516020818303038152906040528051906020012014610486576040517f580e8a7900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104908b5f610937565b506104a08b8b8b8b8b8b8b610c81565b6001600160a01b031660208201526104b781610d81565b80604001516001600160a01b031681602001516001600160a01b03167f3998bcf315dae4953d294b3ca6e1d0074c249adc136b50d1ff99b04753c73e7f835f0151846060015185608001518660e001516040516105179493929190613048565b60405180910390a3806060015181608001519350935050805460ff60a81b1916600160a81b179055909890975095505050505050565b60608060605f5f61055c6111a1565b9198509650945090925090508086106105875760405162839e0f60e81b815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c798054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f93919290919083018282801561062257602002820191905f5260205f20905f905b825461010083900a900460070b81526020600f83018190049384019360010360089093019290920291018084116105ee5790505b505050505090505f633b9aca008567ffffffffffffffff1610156106d6575f836003018054806020026020016040519081016040528092919081815260200182805480156106c057602002820191905f5260205f20905f905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161067b5790505b505050505090506106d28682856117e8565b9150505b5f5b87518110156107f157633b9aca008667ffffffffffffffff16101561074e57610705633b9aca008661309a565b8267ffffffffffffffff16898381518110610722576107226130b1565b60200260200101518c610735919061309a565b61073f919061309a565b61074991906130d9565b6107cc565b61076267ffffffffffffffff87168661309a565b836001855161077191906130ec565b81518110610781576107816130b1565b602002602001015167ffffffffffffffff168983815181106107a5576107a56130b1565b60200260200101518c6107b8919061309a565b6107c2919061309a565b6107cc91906130d9565b8882815181106107de576107de6130b1565b60209081029190910101526001016106d8565b5050505050509193909250565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084e8388306108406004868b8d6130ff565b61084991613126565b611988565b91509150816109285763ffffffff81161561091d575f516020613abf5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108de908b908b908b9060040161318c565b5f604051808303815f87803b1580156108f5575f5ffd5b505af1158015610907573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109289050565b5f9350505050610930565b600193505050505b9392505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c76545f905f516020613abf5f395f51905f52906001600160801b03600160801b82048116911684156109b5578061099a6b033b2e3c9fd0803ce80000008861309a565b6109a491906130d9565b6109ae90836131ca565b93506109e3565b806109cc6b033b2e3c9fd0803ce80000008861309a565b6109d691906130d9565b6109e090836130ec565b93505b670de0b6b3a764000084111580610a0957506ec097ce7bc90715b34b9f10000000008410155b15610be7575f83600201805480602002602001604051908101604052809291908181526020018280548015610a6557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610a47575b505050505090505f815190505f5f5b82811015610b9a575f610b076b033b2e3c9fd0803ce80000008a8a6005015f898781518110610aa557610aa56130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2054610af891906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1661309a565b610b0291906130d9565b611a60565b9050610b1381846131dd565b9250806001600160801b0316886005015f878581518110610b3657610b366130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f2080547affffffffffffffffffffffffffffffffffffffffffffffffffffff92909216650100000000000264ffffffffff90921691909117905550600101610a74565b506001860180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166001600160801b0392909216919091179055506b033b2e3c9fd0803ce80000009450505b610bf084611a60565b6001840180546001600160801b03928316600160801b02921691909117905584158015610c28575060018301546001600160801b0316155b15610c455760405162839e0f60e81b815260040160405180910390fd5b6040518481527fb4fde7403c001c7cdeafc0c3bb46e972111b7efac4e832398cbf9fabe1694ed99060200160405180910390a150505092915050565b5f516020613abf5f395f51905f525481515f916001600160a01b03169015610d1557610cb289898989898989611a9c565b6040516315a38ec760e11b8152600481018b90523060248201529092506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610cfa575f5ffd5b505af1158015610d0c573d5f5f3e3d5ffd5b50505050610d75565b6040516315a38ec760e11b8152600481018a9052336024820181905292506001600160a01b03821690632b471d8e906044015f604051808303815f87803b158015610d5e575f5ffd5b505af1158015610d70573d5f5f3e3d5ffd5b505050505b50979650505050505050565b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c778054604080516020808402820181019092528281525f516020613abf5f395f51905f52935f939192909190830182828015610e0457602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610de6575b505050505090505f5f84608001515190505f5b81811015611199578560c001518181518110610e3557610e356130b1565b602002602001015186608001518281518110610e5357610e536130b1565b60200260200101511015610e93576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f86608001518281518110610eaa57610eaa6130b1565b6020026020010151118015610ee857505f610ee687606001518381518110610ed457610ed46130b1565b60200260200101518860e00151611bba565b125b15611155575f856005015f868681518110610f0557610f056130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f208054909150640100000000900460ff1615801590610fda5750610fd8816006018054610f52906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e906131fc565b8015610fc95780601f10610fa057610100808354040283529160200191610fc9565b820191905f5260205f20905b815481529060010190602001808311610fac57829003601f168201915b50505050508860400151611c16565b155b15611011576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff16156110f7576110f287606001518381518110611034576110346130b1565b6020026020010151886040015189608001518581518110611057576110576130b1565b6020026020010151846007016001018054611071906131fc565b80601f016020809104026020016040519081016040528092919081815260200182805461109d906131fc565b80156110e85780601f106110bf576101008083540402835291602001916110e8565b820191905f5260205f20905b8154815290600101906020018083116110cb57829003601f168201915b5050505050611d87565b611153565b611153876040015188608001518481518110611115576111156130b1565b602002602001015189606001518581518110611133576111336130b1565b60200260200101516001600160a01b0316611e489092919063ffffffff16565b505b8060018760a00151858151811061116e5761116e6130b1565b602002602001015161118091906130ec565b116111915761118e83613234565b92505b600101610e17565b505050505050565b5f8060608080835f516020613abf5f395f51905f5290505f5f8260020180548060200260200160405190810160405280929190818152602001828054801561121057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116111f2575b505050505090505f815190505f8167ffffffffffffffff81111561123657611236612b99565b60405190808252806020026020018201604052801561125f578160200160208202803683370190505b5095505f5b8281101561133157856005015f858381518110611283576112836130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f9081205460ff1690036112c1576112ba82613234565b915061130b565b856005015f8583815181106112d8576112d86130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f206007015461130890836131ca565b91505b8187828151811061131e5761131e6130b1565b6020908102919091010152600101611264565b508067ffffffffffffffff81111561134b5761134b612b99565b604051908082528060200260200182016040528015611374578160200160208202803683370190505b5096508067ffffffffffffffff81111561139057611390612b99565b6040519080825280602002602001820160405280156113b9578160200160208202803683370190505b5097505f5f5b83811015611774575f876005015f8784815181106113df576113df6130b1565b6020908102919091018101516001600160a01b031682528101919091526040015f908120805490925060ff161561157d5760606114a8836007016001018054611427906131fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611453906131fc565b801561149e5780601f106114755761010080835404028352916020019161149e565b820191905f5260205f20905b81548152906001019060200180831161148157829003601f168201915b5050505050611ecd565b81519093509091505f5b8181101561156957600785018054829081106114d0576114d06130b1565b5f918252602090912001546001600160a01b03168f6114ef838a6131ca565b815181106114ff576114ff6130b1565b60200260200101906001600160a01b031690816001600160a01b031681525050828181518110611531576115316130b1565b60200260200101518e828961154691906131ca565b81518110611556576115566130b1565b60209081029190910101526001016114b2565b5061157481876131ca565b9550505061168b565b86838151811061158f5761158f6130b1565b60209081029190910101516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161a919061324c565b905086838151811061162e5761162e6130b1565b60200260200101518c8581518110611648576116486130b1565b6001600160a01b0390921660209283029190910190910152808b8561166c81613234565b96508151811061167e5761167e6130b1565b6020026020010181815250505b5f61171f83600501805461169e906131fc565b80601f01602080910402602001604051908101604052809291908181526020018280546116ca906131fc565b80156117155780601f106116ec57610100808354040283529160200191611715565b820191905f5260205f20905b8154815290600101906020018083116116f857829003601f168201915b5050505050611f7c565b8354909150670de0b6b3a7640000906117469084906301000000900460ff1660125f612048565b611750908361309a565b61175a91906130d9565b611764908a6131ca565b98505050508060010190506113bf565b50506001808601546117a8916001600160801b0380831692600160801b900416906b033b2e3c9fd0803ce8000000906120c3565b985088156117d0576117c96117c485633b9aca008c60016120c3565b612105565b99506117dc565b67ffffffffffffffff99505b50505050509091929394565b5f5f6117f860018560018861213b565b9050801580156118345750835f81518110611815576118156130b1565b602002602001015167ffffffffffffffff168567ffffffffffffffff16105b1561185b57825f8151811061184b5761184b6130b1565b6020026020010151915050610930565b6001845161186991906130ec565b810361188e57826001855161187e91906130ec565b8151811061184b5761184b6130b1565b8381815181106118a0576118a06130b1565b6020026020010151848260016118b691906131ca565b815181106118c6576118c66130b1565b60200260200101516118d89190613263565b8482815181106118ea576118ea6130b1565b6020026020010151866118fd9190613263565b84838151811061190f5761190f6130b1565b60200260200101518584600161192591906131ca565b81518110611935576119356130b1565b60200260200101516119479190613283565b61195191906132b2565b61195b91906132d1565b83828151811061196d5761196d6130b1565b602002602001015161197f919061330e565b95945050505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611a56575f516020805191945081901c150291505b5094509492505050565b5f6001600160801b03821115611a98576040516306dfcc6560e41b815260806004820152602481018390526044015b60405180910390fd5b5090565b5f5f82806020019051810190611ab2919061338a565b905088816020015114611af1576040517f1115766700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611b09825f01518b8b8b8b8b8b89608001516122d0565b5f516020613abf5f395f51905f525483516020850151604080870151606088015160a089015192517f88b7ab630000000000000000000000000000000000000000000000000000000081529697506001600160a01b03909516956388b7ab6395611b7e959430949093928a9190600401613431565b5f604051808303815f87803b158015611b95575f5ffd5b505af1158015611ba7573d5f5f3e3d5ffd5b505092519b9a5050505050505050505050565b80515f90815b81811015611c0b57838181518110611bda57611bda6130b1565b60200260200101516001600160a01b0316856001600160a01b031603611c035791506102359050565b600101611bc0565b505f19949350505050565b5f5f5f84806020019051810190611c2d91906134b1565b915091505f611c465f516020613abf5f395f51905f5290565b6008015f848015611c5957611c596134ff565b8015611c6757611c676134ff565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f20541115611ca757600192505050610235565b805115611d7d575f828015611cbe57611cbe6134ff565b03611d7d575f81806020019051810190611cd89190613513565b90506001600160a01b03811615611d7b576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015611d4d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d71919061352e565b9350505050610235565b505b505f949350505050565b5f5f611d92836123b7565b90925090505f828015611da757611da76134ff565b036111995780806020019051810190611dc09190613513565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611e2a575f5ffd5b505af1158015611e3c573d5f5f3e3d5ffd5b50505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611ec89084906123d8565b505050565b60605f5f5f611edb856123b7565b90925090505f828015611ef057611ef06134ff565b03611f755780806020019051810190611f099190613513565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa158015611f43573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611f6a9190810190613549565b935093505050915091565b5050915091565b5f5f5f5f5f611f8a86612463565b50929650909450925090506001846009811115611fa957611fa96134ff565b03612030575f82806020019051810190611fc39190613513565b9050806001600160a01b0316636256f2c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612001573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612025919061324c565b979650505050505050565b61203d848484845f612490565b509695505050505050565b5f8260ff168460ff161115612084575f61206284866135e4565b61206d90600a6136e0565b905061207c86600183866120c3565b9150506120bb565b8260ff168460ff1610156120b85761209c84846135e4565b6120a790600a6136e0565b6120b1908661309a565b90506120bb565b50835b949350505050565b5f6120f06120d08361252b565b80156120eb57505f84806120e6576120e66130c5565b868809115b151590565b6120fb868686612557565b61197f91906131ca565b5f67ffffffffffffffff821115611a9857604080516306dfcc6560e41b8152600481019190915260248101839052604401611a8f565b5f83515f0361214b57505f6120bb565b835160019086801561219f575067ffffffffffffffff841685876121706001856130ec565b81518110612180576121806130b1565b602002602001015161219291906136ee565b67ffffffffffffffff1611155b806121f55750861580156121f5575067ffffffffffffffff841685876121c66001856130ec565b815181106121d6576121d66130b1565b60200260200101516121e891906136ee565b67ffffffffffffffff1610155b1561220e576122056001826130ec565b925050506120bb565b808210156122c5575f6122218383612607565b905087612268578467ffffffffffffffff1686888381518110612246576122466130b1565b602002602001015161225891906136ee565b67ffffffffffffffff16106122a4565b8467ffffffffffffffff1686888381518110612286576122866130b1565b602002602001015161229891906136ee565b67ffffffffffffffff16115b156122b1578091506122bf565b6122bc8160016131ca565b92505b5061220e565b6120256001836130ec565b5f7fb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d45f1b89898989896040516020016123099190613711565b6040516020818303038152906040528051906020012089604051602001612330919061300a565b60408051808303601f190181528282528051602091820120818401999099526001600160a01b0397881683830152606083019690965293909516608086015260a085019190915260c084015260e083019390935261010082019590955261012080820194909452815180820390940184526101400190525080519101209695505050505050565b5f6060828060200190518101906123ce91906134b1565b9094909350915050565b5f5f60205f8451602086015f885af1806123f7576040513d5f823e3d81fd5b50505f513d9150811561240e57806001141561241b565b6001600160a01b0384163b155b1561245d576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a8f565b50505050565b5f5f60608060608580602001905181019061247e919061374e565b939a9299509097509550909350915050565b5f5f6124a586670de0b6b3a764000086612621565b90506124b2878287612621565b91506124c6670de0b6b3a76400008361309a565b6124d884670de0b6b3a76400006130ec565b6124e2908361309a565b10801561251a57506124fc83670de0b6b3a76400006131ca565b612506908261309a565b612518670de0b6b3a76400008461309a565b105b1561016a5796879650945050505050565b5f6002826003811115612540576125406134ff565b61254a91906137fd565b60ff166001149050919050565b5f5f5f6125648686612a1f565b91509150815f036125885783818161257e5761257e6130c5565b0492505050610930565b81841161259f5761259f6003851502601118612a3b565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f61261560028484186130d9565b610232908484166131ca565b5f80846009811115612635576126356134ff565b03612705575f5f5f5f5f868060200190518101906126539190613901565b945094509450945094505f612668828a612a4c565b86519091505f5b818110156126f5576126eb8389838151811061268d5761268d6130b1565b60200260200101518884815181106126a7576126a76130b1565b60200260200101518885815181106126c1576126c16130b1565b602002602001015160ff168b86815181106126de576126de6130b1565b6020026020010151612a7b565b925060010161266f565b5081975050505050505050610930565b6003846009811115612719576127196134ff565b0361272d5750670de0b6b3a7640000610930565b6002846009811115612741576127416134ff565b0361274d575081610930565b6004846009811115612761576127616134ff565b036127ff576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f8919061324c565b9050610930565b6005846009811115612813576128136134ff565b036128685773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600684600981111561287c5761287c6134ff565b036128d15773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b60078460098111156128e5576128e56134ff565b0361293a5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d4573d5f5f3e3d5ffd5b600884600981111561294e5761294e6134ff565b03612971575f82806020019051810190612968919061324c565b91506109309050565b6009846009811115612985576129856134ff565b03612a18575f5f838060200190518101906129a09190613a2c565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a05919061324c565b612a0f91906130d9565b92505050610930565b5081610930565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5f80836001811115612a6057612a606134ff565b03612a745750670de0b6b3a7640000610235565b5080610235565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612aba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ade9190613a71565b509350509250505f82131580612b02575063ffffffff8416612b0082426130ec565b115b15612b39576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612b6c57612b4f85600a613ab3565b612b59838a61309a565b612b6391906130d9565b9250505061197f565b81612b7886600a613ab3565b612b59908a61309a565b6001600160a01b0381168114612b96575f5ffd5b50565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612bd057612bd0612b99565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612bff57612bff612b99565b604052919050565b5f67ffffffffffffffff821115612c2057612c20612b99565b5060051b60200190565b5f82601f830112612c39575f5ffd5b8135612c4c612c4782612c07565b612bd6565b8082825260208201915060208360051b860101925085831115612c6d575f5ffd5b602085015b83811015612c8a578035835260209283019201612c72565b5095945050505050565b5f82601f830112612ca3575f5ffd5b8135612cb1612c4782612c07565b8082825260208201915060208360051b860101925085831115612cd2575f5ffd5b602085015b83811015612c8a578035612cea81612b82565b835260209283019201612cd7565b5f5f5f5f5f5f60c08789031215612d0d575f5ffd5b863595506020870135612d1f81612b82565b945060408701359350606087013567ffffffffffffffff811115612d41575f5ffd5b612d4d89828a01612c2a565b935050608087013567ffffffffffffffff811115612d69575f5ffd5b612d7589828a01612c94565b9699959850939692959460a09093013593505050565b5f8151808452602084019350602083015f5b82811015612dc45781516001600160a01b0316865260209586019590910190600101612d9d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015612dc4578151865260209586019590910190600101612de0565b604081525f612e106040830185612d8b565b828103602084015261197f8185612dce565b5f5f5f5f5f60a08688031215612e36575f5ffd5b853594506020860135612e4881612b82565b935060408601359250606086013567ffffffffffffffff811115612e6a575f5ffd5b612e7688828901612c2a565b95989497509295608001359392505050565b5f60208284031215612e98575f5ffd5b5035919050565b5f67ffffffffffffffff821115612eb857612eb8612b99565b50601f01601f191660200190565b5f82601f830112612ed5575f5ffd5b8135612ee3612c4782612e9f565b818152846020838601011115612ef7575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f60e0888a031215612f29575f5ffd5b873596506020880135612f3b81612b82565b955060408801359450606088013567ffffffffffffffff811115612f5d575f5ffd5b612f698a828b01612c2a565b945050608088013567ffffffffffffffff811115612f85575f5ffd5b612f918a828b01612c94565b93505060a0880135915060c088013567ffffffffffffffff811115612fb4575f5ffd5b612fc08a828b01612ec6565b91505092959891949750929550565b8015158114612b96575f5ffd5b5f5f60408385031215612fed575f5ffd5b823591506020830135612fff81612fcf565b809150509250929050565b81515f90829060208501835b8281101561303d5781516001600160a01b0316845260209384019390910190600101613016565b509195945050505050565b848152608060208201525f6130606080830186612d8b565b82810360408401526130728186612dce565b905082810360608401526120258185612d8b565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761023557610235613086565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b5f826130e7576130e76130c5565b500490565b8181038181111561023557610235613086565b5f5f8585111561310d575f5ffd5b83861115613119575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015613185577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b8082018082111561023557610235613086565b6001600160801b03818116838216019081111561023557610235613086565b600181811c9082168061321057607f821691505b60208210810361322e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6001820161324557613245613086565b5060010190565b5f6020828403121561325c575f5ffd5b5051919050565b67ffffffffffffffff828116828216039081111561023557610235613086565b600782810b9082900b03677fffffffffffffff198112677fffffffffffffff8213171561023557610235613086565b5f8260070b8260070b028060070b915080821461318557613185613086565b5f8160070b8360070b806132e7576132e76130c5565b677fffffffffffffff1982145f198214161561330557613305613086565b90059392505050565b600781810b9083900b01677fffffffffffffff8113677fffffffffffffff198212171561023557610235613086565b5f82601f83011261334c575f5ffd5b815161335a612c4782612e9f565b81815284602083860101111561336e575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f6020828403121561339a575f5ffd5b815167ffffffffffffffff8111156133b0575f5ffd5b820160c081850312156133c1575f5ffd5b6133c9612bad565b81516133d481612b82565b81526020828101519082015260408083015190820152606080830151908201526080808301519082015260a082015167ffffffffffffffff811115613417575f5ffd5b6134238682850161333d565b60a083015250949350505050565b6001600160a01b03881681526001600160a01b03871660208201528560408201528460608201528360808201528260a082015260e060c08201525f82518060e0840152806020850161010085015e5f6101008285010152610100601f19601f83011684010191505098975050505050505050565b60018110612b96575f5ffd5b5f5f604083850312156134c2575f5ffd5b82516134cd816134a5565b602084015190925067ffffffffffffffff8111156134e9575f5ffd5b6134f58582860161333d565b9150509250929050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215613523575f5ffd5b815161093081612b82565b5f6020828403121561353e575f5ffd5b815161093081612fcf565b5f5f6040838503121561355a575f5ffd5b825167ffffffffffffffff811115613570575f5ffd5b8301601f81018513613580575f5ffd5b805161358e612c4782612c07565b8082825260208201915060208360051b8501019250878311156135af575f5ffd5b6020840193505b828410156135d15783518252602093840193909101906135b6565b6020969096015195979596505050505050565b60ff828116828216039081111561023557610235613086565b6001815b60018411156136385780850481111561361c5761361c613086565b600184161561362a57908102905b60019390931c928002613601565b935093915050565b5f8261364e57506001610235565b8161365a57505f610235565b8160018114613670576002811461367a57613696565b6001915050610235565b60ff84111561368b5761368b613086565b50506001821b610235565b5060208310610133831016604e8410600b84101617156136b9575081810a610235565b6136c55f1984846135fd565b805f19048211156136d8576136d8613086565b029392505050565b5f61023260ff841683613640565b67ffffffffffffffff818116838216029081169081811461318557613185613086565b81515f90829060208501835b8281101561303d57815184526020938401939091019060010161371d565b8051600a8110613749575f5ffd5b919050565b5f5f5f5f5f60a08688031215613762575f5ffd5b61376b8661373b565b94506137796020870161373b565b9350604086015167ffffffffffffffff811115613794575f5ffd5b6137a08882890161333d565b935050606086015167ffffffffffffffff8111156137bc575f5ffd5b6137c88882890161333d565b925050608086015167ffffffffffffffff8111156137e4575f5ffd5b6137f08882890161333d565b9150509295509295909350565b5f60ff83168061380f5761380f6130c5565b8060ff84160691505092915050565b5f82601f83011261382d575f5ffd5b815161383b612c4782612c07565b8082825260208201915060208360051b86010192508583111561385c575f5ffd5b602085015b83811015612c8a57805163ffffffff8116811461387c575f5ffd5b835260209283019201613861565b5f82601f830112613899575f5ffd5b81516138a7612c4782612c07565b8082825260208201915060208360051b8601019250858311156138c8575f5ffd5b602085015b83811015612c8a57805160ff811681146138e5575f5ffd5b8352602092830192016138cd565b805160028110613749575f5ffd5b5f5f5f5f5f60a08688031215613915575f5ffd5b855167ffffffffffffffff81111561392b575f5ffd5b8601601f8101881361393b575f5ffd5b8051613949612c4782612c07565b8082825260208201915060208360051b85010192508a83111561396a575f5ffd5b6020840193505b8284101561399557835161398481612b82565b825260209384019390910190613971565b80985050505050602086015167ffffffffffffffff8111156139b5575f5ffd5b6139c18882890161381e565b945050604086015167ffffffffffffffff8111156139dd575f5ffd5b6139e98882890161388a565b935050606086015167ffffffffffffffff811115613a05575f5ffd5b613a118882890161388a565b925050613a20608087016138f3565b90509295509295909350565b5f5f60408385031215613a3d575f5ffd5b8251613a4881612b82565b6020939093015192949293505050565b805169ffffffffffffffffffff81168114613749575f5ffd5b5f5f5f5f5f60a08688031215613a85575f5ffd5b613a8e86613a58565b60208701516040880151606089015192975090955093509150613a2060808701613a58565b5f610232838361364056fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220b7fbf7d6a933c486c1d974bb6f124b67553467f098ad407daa4edc583ab3f08764736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -347,10 +367,11 @@ "tokens": "List of tokens that would be given" } }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "details": "The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function", "params": { "deadline": "Timestamp before which the redemption should have occured", + "expectedTokensHash": "`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects", "minAmountOuts": "Minimum amount of each token given back in the redemption to obtain", "receiver": "Address which should be receiving the output tokens" }, @@ -359,10 +380,10 @@ "tokens": "List of tokens returned" } }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { - "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`." + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { + "details": "The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list" }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "details": "Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount" }, "updateNormalizer(uint256,bool)": { @@ -375,28 +396,28 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "2988000", - "executionCost": "3276", - "totalCost": "2991276" + "codeDepositCost": "3024800", + "executionCost": "3323", + "totalCost": "3028123" }, "external": { "quoteRedemptionCurve(uint256)": "infinite", - "redeem(uint256,address,uint256,uint256[])": "infinite", - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": "infinite", - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": "infinite", + "redeem(uint256,address,uint256,uint256[],bytes32)": "infinite", + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": "infinite", + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": "infinite", "updateNormalizer(uint256,bool)": "infinite" }, "internal": { - "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_consumeAuthAndBurn(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_distributeRedemption(struct Redeemer.RedemptionExecution memory)": "infinite", - "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_executeAuthorization(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_quoteRedemptionCurve(uint256)": "infinite", - "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes memory)": "infinite", + "_redeem(uint256,address,uint256,uint256[] memory,address[] memory,bytes32,bytes memory)": "infinite", "_updateNormalizer(uint256,bool)": "infinite" } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[])\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[])\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[])\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts` or `forfeitTokens` invalidates the\\n /// signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x2ea4d5ebd3dd0e83071ebedb2c269f501f37033ddce9a1ee9ec40cfde0adfc7a\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n _updateNormalizer(amount, false);\\n\\n redemption.from = _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(\\n redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config\\n );\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP)).receiveWithAuthorization(\\n params.from,\\n address(this),\\n params.value,\\n params.validAfter,\\n params.validBefore,\\n derivedNonce,\\n params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x52467df54a2a68910287c51c0ee42d304de44a7ccacd22fff8426911835356f3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xcff34e096e1842f6f6ae4c0d0c6eefd4855c8bdc5bc64155d7c14b2dbeee661a;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe41991a0a564f4f6443aeffd6f1519ae3decc8a9e1e625f51ddf2168453ea4f2\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"CannotBurnAllStableIssued\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWhitelisted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooLate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedRedemptionTokens\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newNormalizerValue\",\"type\":\"uint256\"}],\"name\":\"NormalizerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"quoteRedemptionCurve\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"authData\",\"type\":\"bytes\"}],\"name\":\"redeemWithAuthorization\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountOuts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"forfeitTokens\",\"type\":\"address[]\"},{\"internalType\":\"bytes32\",\"name\":\"expectedTokensHash\",\"type\":\"bytes32\"}],\"name\":\"redeemWithForfeit\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"updateNormalizer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `Redeemer` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"returns\":{\"amounts\":\"Amount that would be obtained for each token in the `tokens` array\",\"tokens\":\"List of tokens that would be given\"}},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"details\":\"The `minAmountOuts` list must reflect the amount of `tokens` returnedIn normal conditions, the amount of tokens outputted by this function should be the amount of collateral assets supported by the system, following their order in the `collateralList`.If one collateral has its liquidity managed through strategies, then it's possible that this asset has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering of the token list will be as follows: `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained by calling the `quoteRedemptionCurve` functionTokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the whitelist, otherwise this function revertsNo approval is needed before calling this function\",\"params\":{\"deadline\":\"Timestamp before which the redemption should have occured\",\"expectedTokensHash\":\"`keccak256(abi.encodePacked(tokens))` over the output list the caller was quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\",\"minAmountOuts\":\"Minimum amount of each token given back in the redemption to obtain\",\"receiver\":\"Address which should be receiving the output tokens\"},\"returns\":{\"amounts\":\"Amount given for each token in the `tokens` array\",\"tokens\":\"List of tokens returned\"}},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"details\":\"The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash` invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.`expectedTokensHash` matters most here: a signature stays executable for its whole validity window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"details\":\"Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token even if it has enough immediately available to send the amount\"},\"updateNormalizer(uint256,bool)\":{\"details\":\"This function may be called by trusted addresses: these could be for instance savings contract minting stablecoins when they notice a profit\"}},\"title\":\"Redeemer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"quoteRedemptionCurve(uint256)\":{\"notice\":\"Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\"},\"redeem(uint256,address,uint256,uint256[],bytes32)\":{\"notice\":\"Redeems `amount` of stablecoins from the system\"},\"redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)\":{\"notice\":\"Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer.\"},\"redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)\":{\"notice\":\"Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`.\"},\"updateNormalizer(uint256,bool)\":{\"notice\":\"Updates the normalizer variable by `amount`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/Redeemer.sol\":\"Redeemer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRedeemer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRedeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRedeemer` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRedeemer.sol\\ninterface IRedeemer {\\n /// @notice Redeems `amount` of stablecoins from the system\\n /// @param receiver Address which should be receiving the output tokens\\n /// @param deadline Timestamp before which the redemption should have occured\\n /// @param minAmountOuts Minimum amount of each token given back in the redemption to obtain\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the output list the caller was\\n /// quoted, as returned by `quoteRedemptionCurve`. The redemption reverts if the live list differs, since\\n /// `minAmountOuts` is positional and a collateral rotation can change which token each entry protects\\n /// @return tokens List of tokens returned\\n /// @return amounts Amount given for each token in the `tokens` array\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for\\n /// which the Parallelizer system will not try to do a transfer to `receiver`.\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP\\n /// transfer.\\n /// @dev The signed EIP-3009 nonce MUST equal `LibAuthorization.computeRedeemNonce(...)` so that\\n /// mutating `receiver`, `amount`, `deadline`, `minAmountOuts`, `forfeitTokens` or `expectedTokensHash`\\n /// invalidates the signature. `authData.nonce` carries the caller-chosen `userSalt`.\\n /// @dev `expectedTokensHash` matters most here: a signature stays executable for its whole validity\\n /// window, so without it a relayer could hold one until a collateral rotation reshuffles the output list\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block\\n /// @return tokens List of tokens that would be given\\n /// @return amounts Amount that would be obtained for each token in the `tokens` array\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts);\\n\\n /// @notice Updates the normalizer variable by `amount`\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x3362bd4532915b6e2b26b2fdc967a89ea66de5ea5f669d7a621ee69d75c02273\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/IEIP3009.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @title IEIP3009\\n/// @notice Interface for EIP-3009: Transfer With Authorization\\ninterface IEIP3009 {\\n /// @notice Execute a transfer with a signed authorization (EOA signature)\\n /// @dev SECURITY: anyone may submit this call (no `msg.sender` restriction). Integrators that\\n /// pair the transfer with downstream logic (e.g. swap, deposit, redeem) MUST use\\n /// `receiveWithAuthorization` instead: a mempool watcher can otherwise frontrun the original\\n /// transaction with a raw `transferWithAuthorization`, burning the nonce so the original\\n /// reverts while the funds still move - causing the post-transfer logic to be skipped.\\n /// Use this primitive only for direct payouts to a passive recipient (`msg.sender != to`).\\n /// @param from The address of the sender\\n /// @param to The address of the recipient\\n /// @param value The amount of tokens to transfer\\n /// @param validAfter The timestamp after which the authorization is valid\\n /// @param validBefore The timestamp before which the authorization is valid\\n /// @param nonce The nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Execute a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev SECURITY: see the EOA overload - this primitive is frontrun-prone and must not be used\\n /// when the transfer is bound to follow-on logic. Use `receiveWithAuthorization` in that case.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function transferWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EOA signature)\\n /// @dev The caller must be the payee (`to` address). This has an additional check to ensure\\n /// that the payee's address matches the caller of this function to prevent front-running attacks.\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n external;\\n\\n /// @notice Receive a transfer with a signed authorization (EIP-1271 compatible)\\n /// @dev The caller must be the payee (`to` address)\\n /// @param from The payer's address (Authorizer)\\n /// @param to The payee's address\\n /// @param value The amount to be transferred\\n /// @param validAfter The time after which this is valid (unix time)\\n /// @param validBefore The time before which this is valid (unix time)\\n /// @param nonce The nonce\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function receiveWithAuthorization(\\n address from,\\n address to,\\n uint256 value,\\n uint256 validAfter,\\n uint256 validBefore,\\n bytes32 nonce,\\n bytes calldata signature\\n )\\n external;\\n\\n /// @notice Attempt to cancel an authorization\\n /// @dev Works only if the authorization is not yet used.\\n /// EOA wallet signatures should be packed in the order of r, s, v.\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param v The recovery id of the signature\\n /// @param r The r value of the signature\\n /// @param s The s value of the signature\\n function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external;\\n\\n /// @notice Cancel an authorization (EIP-1271 compatible)\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @param signature The signature bytes signed by an EOA wallet or a contract wallet\\n function cancelAuthorization(address authorizer, bytes32 nonce, bytes calldata signature) external;\\n\\n /// @notice Returns the state of an authorization\\n /// @param authorizer Authorizer's address\\n /// @param nonce Nonce of the authorization\\n /// @return true if the nonce is used\\n function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xe34cfb584a925054c2e3569c4401c619cd2b928a7b9da04537e71a9089edf55a\",\"license\":\"MIT\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/Redeemer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\nimport { IRedeemer } from \\\"contracts/interfaces/IRedeemer.sol\\\";\\nimport { IEIP3009 } from \\\"contracts/interfaces/external/IEIP3009.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\nimport { LibAuthorization } from \\\"../libraries/LibAuthorization.sol\\\";\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibWhitelist } from \\\"../libraries/LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title Redeemer\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `Redeemer` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/Redeemer.sol\\ncontract Redeemer is IRedeemer, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n event Redeemed(\\n uint256 amount,\\n address[] tokens,\\n uint256[] amounts,\\n address[] forfeitTokens,\\n address indexed from,\\n address indexed to\\n );\\n event NormalizerUpdated(uint256 newNormalizerValue);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @inheritdoc IRedeemer\\n /// @dev The `minAmountOuts` list must reflect the amount of `tokens` returned\\n /// @dev In normal conditions, the amount of tokens outputted by this function should be the amount\\n /// of collateral assets supported by the system, following their order in the `collateralList`.\\n /// @dev If one collateral has its liquidity managed through strategies, then it's possible that this asset\\n /// has sub-collaterals with it. In this situation, these sub-collaterals may be sent during the redemption\\n /// process and the `minAmountOuts` will be bigger than the `collateralList` length. If there are 3 collateral\\n /// assets and the 2nd collateral asset in the list (at index 1) consists of 3 sub-collaterals, then the ordering\\n /// of the token list will be as follows:\\n /// `[collat 1, sub-collat 1 of collat 2, sub-collat 2 of collat 2, sub-collat 3 of collat 2, collat 3]`\\n /// @dev The list of tokens outputted (and hence the minimum length of the `minAmountOuts` list) can be obtained\\n /// by calling the `quoteRedemptionCurve` function\\n /// @dev Tokens requiring a whitelist must be forfeited if the redemption is to an address that is not in the\\n /// whitelist, otherwise this function reverts\\n /// @dev No approval is needed before calling this function\\n function redeem(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, new address[](0), expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev Beware that if a token is given in the `forfeitTokens` list, the redemption will not try to send token\\n /// even if it has enough immediately available to send the amount\\n function redeemWithForfeit(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, \\\"\\\");\\n }\\n\\n /// @inheritdoc IRedeemer\\n function redeemWithAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n external\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n return _redeem(amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n }\\n\\n /// @inheritdoc IRedeemer\\n /// @dev This function may be called by trusted addresses: these could be for instance savings contract\\n /// minting stablecoins when they notice a profit\\n function updateNormalizer(uint256 amount, bool increase) external returns (uint256) {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && s.transmuterStorage().isTrusted[msg.sender] == 0) {\\n revert NotTrusted();\\n }\\n return _updateNormalizer(amount, increase);\\n }\\n\\n /// @inheritdoc IRedeemer\\n function quoteRedemptionCurve(uint256 amount)\\n external\\n view\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n (tokens, amounts,) = _quoteRedemptionCurve(amount);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Working set passed by reference between `_redeem` and its loop helper, so the call\\n /// site stays under the EVM stack-depth limit when compiling without via-IR.\\n struct RedemptionExecution {\\n uint256 amount;\\n address from;\\n address to;\\n address[] tokens;\\n uint256[] amounts;\\n uint256[] subCollateralsTracker;\\n uint256[] minAmountOuts;\\n address[] forfeitTokens;\\n }\\n\\n /// @notice Internal function of the `redeem` function in the `Redeemer` contract\\n function _redeem(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n nonReentrant\\n returns (address[] memory tokens, uint256[] memory amounts)\\n {\\n if (s.transmuterStorage().isRedemptionLive == 0) revert Paused();\\n if (block.timestamp > deadline) revert TooLate();\\n\\n RedemptionExecution memory redemption;\\n redemption.amount = amount;\\n redemption.to = to;\\n redemption.minAmountOuts = minAmountOuts;\\n redemption.forfeitTokens = forfeitTokens;\\n\\n (redemption.tokens, redemption.amounts, redemption.subCollateralsTracker) = _quoteRedemptionCurve(amount);\\n if (redemption.amounts.length != minAmountOuts.length) revert InvalidLengths();\\n // `minAmountOuts` is positional, so it only protects quantities. Binding the output list itself is what\\n // ties each minimum to the token it was quoted against, across a collateral rotation\\n if (keccak256(abi.encodePacked(redemption.tokens)) != expectedTokensHash) revert UnexpectedRedemptionTokens();\\n _updateNormalizer(amount, false);\\n\\n redemption.from =\\n _consumeAuthAndBurn(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n\\n _distributeRedemption(redemption);\\n emit Redeemed(\\n redemption.amount,\\n redemption.tokens,\\n redemption.amounts,\\n redemption.forfeitTokens,\\n redemption.from,\\n redemption.to\\n );\\n return (redemption.tokens, redemption.amounts);\\n }\\n\\n /// @notice Releases each non-forfeited collateral output to `redemption.to`. Extracted from `_redeem`\\n /// so the parent function stays within the EVM stack-depth limit.\\n function _distributeRedemption(RedemptionExecution memory redemption) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 indexCollateral;\\n uint256 amountsLength = redemption.amounts.length;\\n for (uint256 i; i < amountsLength; ++i) {\\n if (redemption.amounts[i] < redemption.minAmountOuts[i]) revert TooSmallAmountOut();\\n // If a token is in the `forfeitTokens` list, then it is not sent as part of the redemption process\\n if (redemption.amounts[i] > 0 && LibHelpers.checkList(redemption.tokens[i], redemption.forfeitTokens) < 0) {\\n Collateral storage collatInfo = ts.collaterals[collateralListMem[indexCollateral]];\\n if (collatInfo.onlyWhitelisted > 0 && !LibWhitelist.checkWhitelist(collatInfo.whitelistData, redemption.to)) {\\n revert NotWhitelisted();\\n }\\n if (collatInfo.isManaged > 0) {\\n LibManager.release(redemption.tokens[i], redemption.to, redemption.amounts[i], collatInfo.managerData.config);\\n } else {\\n IERC20(redemption.tokens[i]).safeTransfer(redemption.to, redemption.amounts[i]);\\n }\\n }\\n if (redemption.subCollateralsTracker[indexCollateral] - 1 <= i) ++indexCollateral;\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer (auth flow) or burns directly from\\n /// `msg.sender`, and returns the address to attribute the `Redeemed` event to.\\n function _consumeAuthAndBurn(\\n uint256 amount,\\n address to,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n ITokenP tokenP = s.transmuterStorage().tokenP;\\n if (authData.length > 0) {\\n from = _executeAuthorization(amount, to, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, authData);\\n tokenP.burnSelf(amount, address(this));\\n } else {\\n from = msg.sender;\\n tokenP.burnSelf(amount, msg.sender);\\n }\\n }\\n\\n /// @notice Pulls the redeem amount from the signer via EIP-3009 `receiveWithAuthorization`,\\n /// using a derived nonce that binds the full redemption intent.\\n /// @return from The authorizer address (`params.from`), to attribute the redeem event to\\n function _executeAuthorization(\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes memory authData\\n )\\n internal\\n returns (address from)\\n {\\n AuthorizationParams memory params = abi.decode(authData, (AuthorizationParams));\\n if (params.value != amount) revert InvalidSwap();\\n bytes32 derivedNonce = LibAuthorization.computeRedeemNonce(\\n params.from, amount, receiver, deadline, minAmountOuts, forfeitTokens, expectedTokensHash, params.nonce\\n );\\n IEIP3009(address(s.transmuterStorage().tokenP))\\n .receiveWithAuthorization(\\n params.from, address(this), params.value, params.validAfter, params.validBefore, derivedNonce, params.signature\\n );\\n return params.from;\\n }\\n\\n /// @dev This function reverts if `stablecoinsIssued==0`, which is expected behavior as there is nothing to redeem\\n /// anyway in this case, or if the `amountBurnt` is greater than `stablecoinsIssued`\\n /// @dev Invariant: `penaltyFactor` is evaluated once at the entry-time `collatRatio` and applied uniformly to the\\n /// full `amountBurnt`. The curve is not path-integrated, so a single redemption that traverses into a lower-penalty\\n /// segment still pays the entry-time rate on every unit burned. Splitting the same redemption into smaller calls\\n /// can yield a strictly better blended rate when the path crosses an ascending segment of the curve. This is a\\n /// deliberate design choice consistent with penalizing early redemptions during under-collateralization; the gap\\n /// between single-call and path-integrated pricing scales with the ascending-segment slope and should be\\n /// considered when calibrating `xRedemptionCurve`/`yRedemptionCurve`.\\n function _quoteRedemptionCurve(uint256 amountBurnt)\\n internal\\n view\\n returns (address[] memory tokens, uint256[] memory balances, uint256[] memory subCollateralsTracker)\\n {\\n uint64 collatRatio;\\n uint256 stablecoinsIssued;\\n (collatRatio, stablecoinsIssued, tokens, balances, subCollateralsTracker) = LibGetters.getCollateralRatio();\\n if (amountBurnt >= stablecoinsIssued) revert CannotBurnAllStableIssued();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n int64[] memory yRedemptionCurveMem = ts.yRedemptionCurve;\\n uint64 penaltyFactor;\\n // If the protocol is under-collateralized, a penalty factor is applied to the returned amount of each asset\\n if (collatRatio < BASE_9) {\\n uint64[] memory xRedemptionCurveMem = ts.xRedemptionCurve;\\n penaltyFactor = uint64(LibHelpers.piecewiseLinear(collatRatio, xRedemptionCurveMem, yRedemptionCurveMem));\\n }\\n\\n for (uint256 i; i < balances.length; ++i) {\\n // The amount given for each token in reserves does not depend on the price of the tokens in reserve:\\n // it is a proportion of the balance for each token computed as the ratio between the stablecoins\\n // burnt relative to the amount of stablecoins issued.\\n // If the protocol is over-collateralized, the amount of each token given is inversely proportional\\n // to the collateral ratio.\\n balances[i] = collatRatio >= BASE_9\\n ? (amountBurnt * balances[i] * (uint64(yRedemptionCurveMem[yRedemptionCurveMem.length - 1])))\\n / (stablecoinsIssued * collatRatio)\\n : (amountBurnt * balances[i] * penaltyFactor) / (stablecoinsIssued * BASE_9);\\n }\\n }\\n\\n /// @notice Updates the `normalizer` variable used to track stablecoins issued from each asset and globally\\n function _updateNormalizer(uint256 amount, bool increase) internal returns (uint256 newNormalizerValue) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 _normalizer = ts.normalizer;\\n uint256 _normalizedStables = ts.normalizedStables;\\n // In case of an increase, the update formula used is the simplified version of the formula below:\\n /*\\n _normalizer * (BASE_27 + BASE_27 * amount / stablecoinsIssued) / BASE_27\\n = _normalizer + (_normalizer * BASE_27 * amount * (BASE_27 / (_normalizedStables * normalizer))) / BASE_27\\n = _normalizer + BASE_27 * amount / _normalizedStables\\n */\\n if (increase) {\\n newNormalizerValue = _normalizer + (amount * BASE_27) / _normalizedStables;\\n } else {\\n newNormalizerValue = _normalizer - (amount * BASE_27) / _normalizedStables;\\n }\\n // If the `normalizer` gets too small or too big, it must be renormalized to later avoid the propagation of\\n // rounding errors, as well as overflows. In this case, the function has to iterate through all the\\n // supported collateral assets\\n if (newNormalizerValue <= BASE_18 || newNormalizerValue >= BASE_36) {\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 collateralListLength = collateralListMem.length;\\n // For each asset, we store the actual amount of stablecoins issued based on the `newNormalizerValue`\\n // (and not a normalized value)\\n // We ensure to preserve the invariant `sum(collateralNewNormalizedStables) = normalizedStables`\\n uint128 newNormalizedStables;\\n for (uint256 i; i < collateralListLength; ++i) {\\n uint128 newCollateralNormalizedStable = ((uint256(ts.collaterals[collateralListMem[i]].normalizedStables)\\n * newNormalizerValue) / BASE_27)\\n .toUint128();\\n newNormalizedStables += newCollateralNormalizedStable;\\n ts.collaterals[collateralListMem[i]].normalizedStables = uint216(newCollateralNormalizedStable);\\n }\\n ts.normalizedStables = newNormalizedStables;\\n newNormalizerValue = BASE_27;\\n }\\n ts.normalizer = newNormalizerValue.toUint128();\\n if (!increase && ts.normalizedStables == 0) revert CannotBurnAllStableIssued();\\n emit NormalizerUpdated(newNormalizerValue);\\n }\\n}\\n\",\"keccak256\":\"0x1a67602de708b202cbfb4311b65c8e28294c043d059c53c66dcd9c7b1512d3c0\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\n/// @title LibAuthorization\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Derives the EIP-3009 nonce that binds the Parallelizer's `*WithAuthorization` entry\\n/// points to their full swap/redeem intent (output `to`, slippage, deadline, ...), closing the\\n/// front-running gap left by vanilla `receiveWithAuthorization` which only commits to the token\\n/// transfer itself.\\n/// @dev Off-chain, the authorizer signs a standard EIP-3009 `ReceiveWithAuthorization` with\\n/// `nonce = compute*Nonce(...)`. The facet recomputes the same value from the call arguments and\\n/// forwards it to the token; tampering with any bound field makes the signature invalid. Replay\\n/// protection is provided by the token's own `authorizationStates` mapping; retries use a fresh\\n/// `userSalt`.\\nlibrary LibAuthorization {\\n // keccak256(\\\"SwapExactInputWithAuthorization(address from,address tokenIn,address tokenOut,uint256 amountIn,uint256\\n // amountOutMin,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x9be969f74c66b263054aa69cfac8412777a0dc17ab007f81682c6b156ba06d79;\\n\\n // keccak256(\\\"SwapExactOutputWithAuthorization(address from,address tokenIn,address tokenOut,uint256\\n // amountOut,uint256 amountInMax,address to,uint256 deadline,bytes32 userSalt)\\\")\\n bytes32 internal constant SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH =\\n 0x41378613b6b468c26472b6d9a40faaeaf3c63b23ae57d1d7e3a7c3d2c356b1ed;\\n\\n // keccak256(\\\"RedeemWithAuthorization(address from,uint256 amount,address receiver,uint256 deadline,bytes32\\n // minAmountOutsHash,bytes32 forfeitTokensHash,bytes32 expectedTokensHash,bytes32 userSalt)\\\")\\n bytes32 internal constant REDEEM_WITH_AUTHORIZATION_TYPEHASH =\\n 0xb6577f08e668b53303325a19233e8315142d69bedb6d7e1d8d0e9af2473486d4;\\n\\n function computeSwapExactInputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_INPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountIn,\\n amountOutMin,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n function computeSwapExactOutputNonce(\\n address from,\\n address tokenIn,\\n address tokenOut,\\n uint256 amountOut,\\n uint256 amountInMax,\\n address to,\\n uint256 deadline,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n SWAP_EXACT_OUTPUT_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n tokenIn,\\n tokenOut,\\n amountOut,\\n amountInMax,\\n to,\\n deadline,\\n userSalt\\n )\\n );\\n }\\n\\n /// @param expectedTokensHash `keccak256(abi.encodePacked(tokens))` over the redemption output list the\\n /// authorizer was quoted, binding token identity and ordering rather than raw amounts alone\\n function computeRedeemNonce(\\n address from,\\n uint256 amount,\\n address receiver,\\n uint256 deadline,\\n uint256[] memory minAmountOuts,\\n address[] memory forfeitTokens,\\n bytes32 expectedTokensHash,\\n bytes32 userSalt\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encode(\\n REDEEM_WITH_AUTHORIZATION_TYPEHASH,\\n from,\\n amount,\\n receiver,\\n deadline,\\n keccak256(abi.encodePacked(minAmountOuts)),\\n keccak256(abi.encodePacked(forfeitTokens)),\\n expectedTokensHash,\\n userSalt\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x195b02224ec034756820857b7f88acc6ace194d00a68a9a6f0bcb8adf38963c8\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -407,13 +428,13 @@ "quoteRedemptionCurve(uint256)": { "notice": "Simulate the exact output that a redemption of `amount` of stablecoins would give at a given block" }, - "redeem(uint256,address,uint256,uint256[])": { + "redeem(uint256,address,uint256,uint256[],bytes32)": { "notice": "Redeems `amount` of stablecoins from the system" }, - "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes)": { + "redeemWithAuthorization(uint256,address,uint256,uint256[],address[],bytes32,bytes)": { "notice": "Same as `redeemWithForfeit` but using a single EIP-3009 authorization for the tokenP transfer." }, - "redeemWithForfeit(uint256,address,uint256,uint256[],address[])": { + "redeemWithForfeit(uint256,address,uint256,uint256[],address[],bytes32)": { "notice": "Same as the redeem function above with the additional feature to specify a list of `forfeitTokens` for which the Parallelizer system will not try to do a transfer to `receiver`." }, "updateNormalizer(uint256,bool)": { @@ -424,13 +445,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0x83b1c8644d2339afe8dfcdb66e1dd1689b9660adcd907a823229ea5f5a99170d", - "nonce": "0xe7", + "hash": "0xe79e4995f6380da8fa4ca2583b08e0378b3aa96c40a401d8d6cf27f32fb5b4b1", + "nonce": "0x108", "origin": "0x66CcEC236bbcE5f1bBd1b2fC0a4014e57A55ad02" }, "receipt": { - "blockHash": "0x2a8ee493301fe4f5f6bfc523049e4d3f17f1f6f9eee5eb38a2a7571623666483", - "blockNumber": "0x186a79e", - "transactionIndex": "0x187" + "blockHash": "0x6e3456bc2a2d782c3250931803bebc784709f1a0ce564d2886d88fb75914a926", + "blockNumber": "0x18ef460", + "transactionIndex": "0x7c" } } \ No newline at end of file diff --git a/deployments/mainnet/RewardHandler.json b/deployments/mainnet/RewardHandler.json index 5d8475d..cc408ba 100644 --- a/deployments/mainnet/RewardHandler.json +++ b/deployments/mainnet/RewardHandler.json @@ -1,5 +1,5 @@ { - "address": "0xa5175c6000dfbc2cbf76b1fa65cd338ff237088b", + "address": "0x5ab916f3f3f834a5289d520077185ff8a9523eb9", "abi": [ { "inputs": [], @@ -18,12 +18,12 @@ }, { "inputs": [], - "name": "OdosSwapFailed", + "name": "ReentrantCall", "type": "error" }, { "inputs": [], - "name": "ReentrantCall", + "name": "RewardSwapFailed", "type": "error" }, { @@ -42,6 +42,11 @@ "name": "TooSmallAmountOut", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -88,8 +93,8 @@ ], "contractName": "RewardHandler", "sourceName": "contracts/parallelizer/facets/RewardHandler.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b50610fa08061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cab565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107c5565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c3f565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d43565b8282815181106102a7576102a7610d2f565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d43565b90505f5f73cf5540fffcdc3d510b18bfca6d2b9987b07725596001600160a01b03168a6040516103549190610d5a565b5f604051808303815f865af19150503d805f811461038d576040519150601f19603f3d011682016040523d82523d5f602084013e610392565b606091505b5091509150816103a5576103a581610911565b86546040516370a0823160e01b815230600482015284916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610d43565b1015610446576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b87811015610602575f89828151811061046557610465610d2f565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104b3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d79190610d43565b90508782815181106104eb576104eb610d2f565b602002602001015181101561051357604051631115766760e01b815260040160405180910390fd5b87828151811061052557610525610d2f565b60200260200101518111156105f9576001935089828151811061054a5761054a610d2f565b6020026020010151925087828151811061056657610566610d2f565b6020026020010151816105799190610d70565b9c508e8d10156105b5576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28e6040516105f091815260200190565b60405180910390a25b5060010161044a565b508161062157604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107a25761070b6106fa82600701600101805461067990610d95565b80601f01602080910402602001604051908101604052809291908181526020018280546106a590610d95565b80156106f05780601f106106c7576101008083540402835291602001916106f0565b820191905f5260205f20905b8154815290600101906020018083116106d357829003601f168201915b5050505050610952565b6001600160a01b038416908e61099e565b6107a28c82600701600101805461072190610d95565b80601f016020809104026020016040519081016040528092919081815260200182805461074d90610d95565b80156107985780601f1061076f57610100808354040283529160200191610798565b820191905f5260205f20905b81548152906001019060200180831161077b57829003601f168201915b5050505050610a23565b5050885460ff60a81b1916600160a81b1790985550969998505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806108158388306108076004868b8d610dcd565b61081091610df4565b610abd565b91509150816109025763ffffffff8116156108f7577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108b8908b908b908b90600401610e5a565b5f604051808303815f87803b1580156108cf575f5ffd5b505af11580156108e1573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109029050565b5f935050505061090a565b600193505050505b9392505050565b80511561092057805181602001fd5b6040517f45d4013e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61095e84610b95565b30945090925090505f82801561097657610976610e98565b03610997578080602001905181019061098f9190610ec3565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e908490610bb6565b505050565b5f5f610a2e83610b95565b90925090505f828015610a4357610a43610e98565b03610ab75780806020019051810190610a5c9190610ec3565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610a8991815260200190565b5f604051808303815f87803b158015610aa0575f5ffd5b505af1158015610ab2573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610b8b575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bac9190610ede565b9094909350915050565b5f5f60205f8451602086015f885af180610bd5576040513d5f823e3d81fd5b50505f513d91508115610bec578060011415610bf9565b6001600160a01b0384163b155b15610ab7576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c7c57610c7c610c3f565b604052919050565b5f67ffffffffffffffff821115610c9d57610c9d610c3f565b50601f01601f191660200190565b5f5f60408385031215610cbc575f5ffd5b82359150602083013567ffffffffffffffff811115610cd9575f5ffd5b8301601f81018513610ce9575f5ffd5b8035610cfc610cf782610c84565b610c53565b818152866020838501011115610d10575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d53575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610d8f57634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610da957607f821691505b602082108103610dc757634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610ddb575f5ffd5b83861115610de7575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e53577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ec0575f5ffd5b50565b5f60208284031215610ed3575f5ffd5b815161090a81610eac565b5f5f60408385031215610eef575f5ffd5b825160018110610efd575f5ffd5b602084015190925067ffffffffffffffff811115610f19575f5ffd5b8301601f81018513610f29575f5ffd5b8051610f37610cf782610c84565b818152866020838501011115610f4b575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122061f2e881fc702fd22da9d01258cc5b103013facf6eb83ae8ddf66dab5c9a1c6d64736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b50610fd38061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806305b419341461002d575b5f5ffd5b61004061003b366004610cde565b610052565b60405190815260200160405180910390f35b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7580545f919060ff600160a81b90910416600119016100bd576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff60a81b191675020000000000000000000000000000000000000000001781557f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7561010c335f366107f8565b1580156101275750335f908152600782016020526040902054155b1561015e576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816002018054806020026020016040519081016040528092919081815260200182805480156101b557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610197575b505050505090505f815190505f8167ffffffffffffffff8111156101db576101db610c72565b604051908082528060200260200182016040528015610204578160200160208202803683370190505b5090505f5b828110156102ba5783818151811061022357610223610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610271573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610d76565b8282815181106102a7576102a7610d62565b6020908102919091010152600101610209565b5083546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610300573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103249190610d76565b600f8601549091506001600160a01b03168061036c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f826001600160a01b03168b6040516103869190610d8d565b5f604051808303815f865af19150503d805f81146103bf576040519150601f19603f3d011682016040523d82523d5f602084013e6103c4565b606091505b5091509150816103d7576103d781610944565b87546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa15801561041c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104409190610d76565b1015610478576040517f672215de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f5b88811015610634575f8a828151811061049757610497610d62565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105099190610d76565b905088828151811061051d5761051d610d62565b602002602001015181101561054557604051631115766760e01b815260040160405180910390fd5b88828151811061055757610557610d62565b602002602001015181111561062b57600193508a828151811061057c5761057c610d62565b6020026020010151925088828151811061059857610598610d62565b6020026020010151816105ab9190610da3565b9d508f8e10156105e7576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b03167fbe1da12e92b73d3ecd35edcc32270e8ffaa4ee9fe30f671989b3d2e88a2c2ea28f60405161062291815260200190565b60405180910390a25b5060010161047c565b508161065357604051631115766760e01b815260040160405180910390fd5b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff16156107d45761073d61072c8260070160010180546106ab90610dc8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d790610dc8565b80156107225780601f106106f957610100808354040283529160200191610722565b820191905f5260205f20905b81548152906001019060200180831161070557829003601f168201915b5050505050610985565b6001600160a01b038416908f6109d1565b6107d48d82600701600101805461075390610dc8565b80601f016020809104026020016040519081016040528092919081815260200182805461077f90610dc8565b80156107ca5780601f106107a1576101008083540402835291602001916107ca565b820191905f5260205f20905b8154815290600101906020018083116107ad57829003601f168201915b5050505050610a56565b5050895460ff60a81b1916600160a81b1790995550979a9950505050505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061084883883061083a6004868b8d610e00565b61084391610e27565b610af0565b91509150816109355763ffffffff81161561092a577f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906108eb908b908b908b90600401610e8d565b5f604051808303815f87803b158015610902575f5ffd5b505af1158015610914573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506109359050565b5f935050505061093d565b600193505050505b9392505050565b80511561095357805181602001fd5b6040517f8a585ae100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f61099184610bc8565b30945090925090505f8280156109a9576109a9610ecb565b036109ca57808060200190518101906109c29190610ef6565b949350505050565b5050919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a51908490610be9565b505050565b5f5f610a6183610bc8565b90925090505f828015610a7657610a76610ecb565b03610aea5780806020019051810190610a8f9190610ef6565b6001600160a01b0316632afcf480856040518263ffffffff1660e01b8152600401610abc91815260200190565b5f604051808303815f87803b158015610ad3575f5ffd5b505af1158015610ae5573d5f5f3e3d5ffd5b505050505b50505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15610bbe575f516020805191945081901c150291505b5094509492505050565b5f606082806020019051810190610bdf9190610f11565b9094909350915050565b5f5f60205f8451602086015f885af180610c08576040513d5f823e3d81fd5b50505f513d91508115610c1f578060011415610c2c565b6001600160a01b0384163b155b15610aea576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240160405180910390fd5b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610caf57610caf610c72565b604052919050565b5f67ffffffffffffffff821115610cd057610cd0610c72565b50601f01601f191660200190565b5f5f60408385031215610cef575f5ffd5b82359150602083013567ffffffffffffffff811115610d0c575f5ffd5b8301601f81018513610d1c575f5ffd5b8035610d2f610d2a82610cb7565b610c86565b818152866020838501011115610d43575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215610d86575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b81810381811115610dc257634e487b7160e01b5f52601160045260245ffd5b92915050565b600181811c90821680610ddc57607f821691505b602082108103610dfa57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f85851115610e0e575f5ffd5b83861115610e1a575f5ffd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015610e86577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b0381168114610ef3575f5ffd5b50565b5f60208284031215610f06575f5ffd5b815161093d81610edf565b5f5f60408385031215610f22575f5ffd5b825160018110610f30575f5ffd5b602084015190925067ffffffffffffffff811115610f4c575f5ffd5b8301601f81018513610f5c575f5ffd5b8051610f6a610d2a82610cb7565b818152866020838501011115610f7e575f5ffd5b8160208401602083015e5f60208383010152809350505050925092905056fea264697066735822122084a83bbf9418beefc6a587575b19f68db56281c41666b501d04d59b6ccb2780d64736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -108,7 +113,7 @@ "kind": "dev", "methods": { "sellRewards(uint256,bytes)": { - "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped" + "details": "It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped" } }, "title": "RewardHandler", @@ -117,9 +122,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "800000", - "executionCost": "829", - "totalCost": "800829" + "codeDepositCost": "810200", + "executionCost": "842", + "totalCost": "811042" }, "external": { "sellRewards(uint256,bytes)": "infinite" @@ -129,7 +134,7 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OdosSwapFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to Odos router for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a odos call\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to odos\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xff2afcbc8d1c25297324159d3684a323e60b3c9408129aba70d3d6938d093255\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to Odos router for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = ODOS_ROUTER.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes odos revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert OdosSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xf01917011b3966f1783fa024ce6c56b5294ef0f65531bdc3f2e068649cd45038\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokens\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardSwapFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooSmallAmountOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenObtained\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balanceUpdate\",\"type\":\"uint256\"}],\"name\":\"RewardsSoldFor\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sellRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `RewardHandler` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"details\":\"It is impossible to sell a token that is a collateral through this functionTrusted sellers and governance only may call this functionOnly governance can set which tokens can be swapped through this function by passing a prior approval transaction to the configured `swapRouter` for the token to be swapped\"}},\"title\":\"RewardHandler\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"sellRewards(uint256,bytes)\":{\"notice\":\"IRewardHandler\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/RewardHandler.sol\":\"RewardHandler\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IRewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IRewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IRewardHandler` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IRewardHandler.sol\\ninterface IRewardHandler {\\n /// @notice Sells some external tokens through a call to the configured swap router\\n /// @param minAmountOut Minimum amount of the outToken to get\\n /// @param payload Payload to pass to the swap router\\n /// @return amountOut Amount obtained of the outToken\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external returns (uint256 amountOut);\\n}\\n\",\"keccak256\":\"0xb3604f35c5bb44791020588e00774299a6a4adae17d62d1e53cd8be86da6b709\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/RewardHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IRewardHandler } from \\\"contracts/interfaces/IRewardHandler.sol\\\";\\n\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title RewardHandler\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `RewardHandler` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/RewardHandler.sol\\ncontract RewardHandler is IRewardHandler, AccessManagedModifiers {\\n using SafeERC20 for IERC20;\\n\\n event RewardsSoldFor(address indexed tokenObtained, uint256 balanceUpdate);\\n\\n /// @notice IRewardHandler\\n /// @dev It is impossible to sell a token that is a collateral through this function\\n /// @dev Trusted sellers and governance only may call this function\\n /// @dev Only governance can set which tokens can be swapped through this function by passing a prior approval\\n /// transaction to the configured `swapRouter` for the token to be swapped\\n function sellRewards(uint256 minAmountOut, bytes memory payload) external nonReentrant returns (uint256 amountOut) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data) && ts.isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n address[] memory list = ts.collateralList;\\n uint256 listLength = list.length;\\n uint256[] memory balances = new uint256[](listLength);\\n // Getting the balances of all collateral assets of the protocol to see if those do not decrease during\\n // the swap: this is the only way to check that collateral assets have not been sold\\n // Not checking the `subCollaterals` here as swaps should try to increase the balance of one collateral\\n for (uint256 i; i < listLength; ++i) {\\n balances[i] = IERC20(list[i]).balanceOf(address(this));\\n }\\n uint256 tokenPBalance = IERC20(address(ts.tokenP)).balanceOf(address(this));\\n address swapRouter = ts.swapRouter;\\n if (swapRouter == address(0)) revert ZeroAddress();\\n //solhint-disable-next-line\\n (bool success, bytes memory result) = swapRouter.call(payload);\\n if (!success) _revertBytes(result);\\n if (IERC20(address(ts.tokenP)).balanceOf(address(this)) < tokenPBalance) revert InvalidTokens();\\n bool hasIncreased;\\n address collateral;\\n for (uint256 i; i < listLength; ++i) {\\n uint256 newBalance = IERC20(list[i]).balanceOf(address(this));\\n if (newBalance < balances[i]) {\\n revert InvalidSwap();\\n } else if (newBalance > balances[i]) {\\n hasIncreased = true;\\n collateral = list[i];\\n amountOut = newBalance - balances[i];\\n if (amountOut < minAmountOut) revert TooSmallAmountOut();\\n emit RewardsSoldFor(collateral, amountOut);\\n }\\n }\\n if (!hasIncreased) revert InvalidSwap();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n IERC20(collateral).safeTransfer(LibManager.transferRecipient(collatInfo.managerData.config), amountOut);\\n LibManager.invest(amountOut, collatInfo.managerData.config);\\n }\\n }\\n\\n /// @notice Processes the router's revert messages\\n function _revertBytes(bytes memory errMsg) private pure {\\n if (errMsg.length > 0) {\\n //solhint-disable-next-line\\n assembly (\\\"memory-safe\\\") {\\n revert(add(32, errMsg), mload(errMsg))\\n }\\n }\\n revert RewardSwapFailed();\\n }\\n}\\n\",\"keccak256\":\"0xa4e2fdeaaa43d78dfe1a81f458108856ebc92f27a7194e6293ac3c5084325beb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null @@ -145,13 +150,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0x14fd05af892e2125aa2cb42b5f99c9434926e22c73ffe01a83ee59179b3bde6b", - "nonce": "0xe8", + "hash": "0x2984681559a1b2dce01b37e64310aab42ef44d080215a1497c92417c9ffc2e33", + "nonce": "0x109", "origin": "0x66CcEC236bbcE5f1bBd1b2fC0a4014e57A55ad02" }, "receipt": { - "blockHash": "0x505f7b259167bb0c5268bd4d757e3a99928e92c2755a97cc4ab880ed960eef3c", - "blockNumber": "0x186a79f", - "transactionIndex": "0x1ea" + "blockHash": "0xde197ad504a057577c813625b839897d9f08d0e4653d85d3a507d0d54020b06e", + "blockNumber": "0x18ef461", + "transactionIndex": "0xc" } } \ No newline at end of file diff --git a/deployments/mainnet/SettersGovernor.json b/deployments/mainnet/SettersGovernor.json index 59c272c..66f049e 100644 --- a/deployments/mainnet/SettersGovernor.json +++ b/deployments/mainnet/SettersGovernor.json @@ -1,5 +1,5 @@ { - "address": "0xb5a980349434a46687f425075f5558cd185ab9fa", + "address": "0x81a85266ca7dfcfe48a58349e15b258a91d68945", "abi": [ { "inputs": [], @@ -57,6 +57,11 @@ "name": "InvalidParams", "type": "error" }, + { + "inputs": [], + "name": "InvalidPayee", + "type": "error" + }, { "inputs": [], "name": "InvalidRate", @@ -135,6 +140,11 @@ "name": "SafeERC20FailedOperation", "type": "error" }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { "inputs": [], "name": "ZeroAmount", @@ -285,6 +295,31 @@ "name": "OracleSet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousTarget", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTarget", + "type": "uint256" + } + ], + "name": "OracleTargetUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -405,6 +440,19 @@ "name": "SurplusBufferRatioUpdated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "SwapRouterUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -601,6 +649,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "swapRouter", + "type": "address" + } + ], + "name": "setSwapRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -712,8 +773,8 @@ ], "contractName": "SettersGovernor", "sourceName": "contracts/parallelizer/facets/SettersGovernor.sol", - "bytecode": "0x6080604052348015600e575f5ffd5b5061417d8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100e5575f3560e01c806383eae17b11610088578063c1cdee7e11610063578063c1cdee7e146101a9578063c9580804146101bc578063dd94be04146101cf578063f0d2d5a8146101e2575f5ffd5b806383eae17b1461017057806387c8ab7a14610183578063b13b084714610196575f5ffd5b80634d2b3e14116100c35780634d2b3e1414610124578063561c14c4146101375780635c3eebda1461014a5780637c0343a11461015d575f5ffd5b80631b0c7182146100e95780631cb44dfc146100fe5780634591f14814610111575b5f5ffd5b6100fc6100f736600461310f565b6101f5565b005b6100fc61010c36600461316d565b610233565b6100fc61011f3660046131a5565b6102a5565b6100fc6101323660046131ff565b6102dc565b6100fc61014536600461331c565b610310565b6100fc610158366004613343565b610342565b6100fc61016b36600461339d565b6104b1565b6100fc61017e3660046133c9565b6104e4565b6100fc6101913660046133f3565b610517565b6100fc6101a4366004613431565b61060c565b6100fc6101b7366004613492565b61063f565b6100fc6101ca36600461316d565b610673565b6100fc6101dd36600461353f565b6106a5565b6100fc6101f036600461316d565b6106d9565b610200335f3661070b565b6102235760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61022e838383610844565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c60205260408120549003610299576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102a281610995565b50565b6102b0335f3661070b565b6102ce5760405162d1953b60e31b815233600482015260240161021a565b6102d88282610bcb565b5050565b6102e7335f3661070b565b6103055760405162d1953b60e31b815233600482015260240161021a565b61022e838383610f74565b61031b335f3661070b565b6103395760405162d1953b60e31b815233600482015260240161021a565b6102a281611126565b61034d335f3661070b565b61036b5760405162d1953b60e31b815233600482015260240161021a565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff1615610449576104448484848460070160010180546103c390613613565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef90613613565b801561043a5780601f106104115761010080835404028352916020019161043a565b820191905f5260205f20905b81548152906001019060200180831161041d57829003601f168201915b50505050506111f4565b61045d565b61045d6001600160a01b03851684846112b6565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104a291815260200190565b60405180910390a35050505050565b6104bc335f3661070b565b6104da5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611315565b6104ef335f3661070b565b61050d5760405162d1953b60e31b815233600482015260240161021a565b6102d88282611406565b610522335f3661070b565b6105405760405162d1953b60e31b815233600482015260240161021a565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561058d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b1919061364b565b9050818110156105df576105da836105c98385613676565b6001600160a01b03871691906114c6565b610606565b8181111561060657610606836105f58484613676565b6001600160a01b038716919061154d565b50505050565b610617335f3661070b565b6106355760405162d1953b60e31b815233600482015260240161021a565b6102d88282611620565b61064a335f3661070b565b6106685760405162d1953b60e31b815233600482015260240161021a565b61022e83838361174e565b61067e335f3661070b565b61069c5760405162d1953b60e31b815233600482015260240161021a565b6102a281611a12565b6106b0335f3661070b565b6106ce5760405162d1953b60e31b815233600482015260240161021a565b61022e838383611ae9565b6106e4335f3661070b565b6107025760405162d1953b60e31b815233600482015260240161021a565b6102a281611dc9565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b0316818061075b83883061074d6004868b8d613689565b610756916136b0565b611f12565b91509150816108355763ffffffff81161561082a575f5160206141285f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee906107eb908b908b908b90600401613716565b5f604051808303815f87803b158015610802575f5ffd5b505af1158015610814573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108359050565b5f935050505061083d565b600193505050505b9392505050565b60018260ff161115610882576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036108e657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff16600103610910576108fb8230611fd5565b506006810161090a838261379f565b5061092f565b60408051602081019091525f8152600682019061092d908261379f565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba9990610987906006850190879061385a565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206141285f395f51905f5291630100000090910460ff169003610a0557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610ac1866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a4090613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6c90613613565b8015610ab75780601f10610a8e57610100808354040283529160200191610ab7565b820191905f5260205f20905b815481529060010190602001808311610a9a57829003601f168201915b5050505050612148565b9398509196509450925090506008846009811115610ae157610ae16138e9565b14610aff57604051635516a7db60e11b815260040160405180910390fd5b5f610b1386670de0b6b3a764000086612175565b90505f83806020019051810190610b2a919061364b565b905080821115610ba75786868684604051602001610b4a91815260200190565b60408051601f1981840301815290829052610b6c94939291889060200161393f565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610ba1908261379f565b50610bc0565b604051635516a7db60e11b815260040160405180910390fd5b505050505050505050565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff169003610c3c57604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610c87576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610c985750835b15610d58575f610d34836007016001018054610cb390613613565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdf90613613565b8015610d2a5780601f10610d0157610100808354040283529160200191610d2a565b820191905f5260205f20905b815481529060010190602001808311610d0d57829003601f168201915b5050505050612573565b9150508015610d56576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610d826001830182612f23565b610d8f600283015f612f23565b610d9c600383015f612f23565b610da9600483015f612f23565b610db6600583015f612f45565b610dc3600683015f612f45565b600782015f610dd28282612f7c565b610ddf600183015f612f45565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610e4157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610e23575b505083519394505f925050505b610e59600183613676565b811015610f0357876001600160a01b0316838281518110610e7c57610e7c613991565b60200260200101516001600160a01b031603610efb5782610e9e600184613676565b81518110610eae57610eae613991565b6020026020010151866002018281548110610ecb57610ecb613991565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f03565b600101610e4e565b5084600201805480610f1757610f176139a5565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff169003610fd857604051630dcfc57f60e21b815260040160405180910390fd5b805460ff168015801590610fe95750835b15611028575f611004836007016001018054610cb390613613565b9150508015611026576040516309e7761b60e41b815260040160405180910390fd5b505b602083015151156110a057846001600160a01b0316835f01515f8151811061105257611052613991565b60200260200101516001600160a01b03161461108157604051635435b28960e11b815260040160405180910390fd5b61108e8360200151612622565b5050815460ff191660011782556110a9565b815460ff191682555b82518051849160078501916110c5918391602090910190612f97565b50602082015160018201906110da908261379f565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161111791906139b9565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff8216101561116e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206141285f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f6111ff83612622565b90925090505f828015611214576112146138e9565b036112ae578080602001905181019061122d9190613a28565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b158015611297575f5ffd5b505af11580156112a9573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261022e91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612643565b5f5160206141285f395f51905f525f80836001811115611337576113376138e9565b03611384576001600160a01b0384165f908152600683016020526040902054611361906001613676565b6001600160a01b0385165f908152600684016020526040902081905590506113c8565b6001600160a01b0384165f9081526007830160205260409020546113a9906001613676565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a8260011485604051610987929190613a43565b633b9aca00811115611444576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206141285f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611513573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611537919061364b565b905061060684846115488585613a69565b6126c8565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561159a573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be919061364b565b905081811015611613576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161021a565b61060684848484036126c8565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361168457604051630dcfc57f60e21b815260040160405180910390fd5b5f828060200190518101906116999190613ad7565b9450505050505f5f828060200190518101906116b59190613b86565b91509150806001600160801b0316826001600160801b031611156116ec57604051635435b28960e11b815260040160405180910390fd5b6116f585612770565b5060058401611704868261379f565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff9288660405161173e9190613bb3565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206141285f395f51905f5292630100000090910460ff1690036117bf57604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611812906001600160801b03700100000000000000000000000000000000909104811690611803906b033b2e3c9fd0803ce8000000908916613bc5565b61180d9190613bf0565b612873565b90508315611938578154611842906001600160801b038316906501000000000090046001600160d81b0316613c0f565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461187d9082906001600160801b0316613c2e565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce8000000926118f192700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613bc5565b6118fb9190613bf0565b1115611933576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c7565b8154611960906001600160801b038316906501000000000090046001600160d81b0316613c4d565b82546001600160d81b0391909116650100000000000264ffffffffff909116178255600183015461199b9082906001600160801b0316613c6c565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d07910161173e565b806001600160a01b03163b5f03611a55576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611af85750600a8351115b15611b2f576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611b6a576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206141285f395f51905f5281611c815780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bdb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bff919061364b565b90505f81118015611c135750600d82015415155b15611c7f57611c7c8183600d01805480602002602001604051908101604052809291908181526020018280548015611c7257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611c54575b50505050506128c3565b50505b505b5f5b600d820154811015611cd6575f82600e015f84600d018481548110611caa57611caa613991565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611c83565b611ce3600d83015f612f7c565b505f805b8551821015611dba575f5b82811015611d6657868381518110611d0c57611d0c613991565b60200260200101516001600160a01b0316878281518110611d2f57611d2f613991565b60200260200101516001600160a01b031603611d5e5760405163f411c32760e01b815260040160405180910390fd5b600101611cf2565b50611da3868381518110611d7c57611d7c613991565b6020026020010151868481518110611d9657611d96613991565b60200260200101516129e4565b611dad9082613a69565b9050816001019150611ce7565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206141285f395f51905f5291906301000000900460ff1615611e395760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e75573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e999190613c8b565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15611fcb575f516020805191945081901c150291505b5094509492505050565b5f5f5f84806020019051810190611fec9190613cb2565b915091505f6120055f5160206141285f395f51905f5290565b6008015f848015612018576120186138e9565b8015612026576120266138e9565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f2054111561206657600192505050612142565b80511561213c575f82801561207d5761207d6138e9565b0361213c575f818060200190518101906120979190613a28565b90506001600160a01b0381161561213a576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af115801561210c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121309190613cf6565b9350505050612142565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906121639190613ad7565b939a9299509097509550909350915050565b5f80846009811115612189576121896138e9565b03612259575f5f5f5f5f868060200190518101906121a79190613dec565b945094509450945094505f6121bc828a612b01565b86519091505f5b818110156122495761223f838983815181106121e1576121e1613991565b60200260200101518884815181106121fb576121fb613991565b602002602001015188858151811061221557612215613991565b602002602001015160ff168b868151811061223257612232613991565b6020026020010151612b30565b92506001016121c3565b508197505050505050505061083d565b600384600981111561226d5761226d6138e9565b036122815750670de0b6b3a764000061083d565b6002846009811115612295576122956138e9565b036122a157508161083d565b60048460098111156122b5576122b56138e9565b03612353576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234c919061364b565b905061083d565b6005846009811115612367576123676138e9565b036123bc5773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60068460098111156123d0576123d06138e9565b036124255773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b6007846009811115612439576124396138e9565b0361248e5773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015612328573d5f5f3e3d5ffd5b60088460098111156124a2576124a26138e9565b036124c5575f828060200190518101906124bc919061364b565b915061083d9050565b60098460098111156124d9576124d96138e9565b0361256c575f5f838060200190518101906124f49190613f17565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612535573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612559919061364b565b6125639190613bf0565b9250505061083d565b508161083d565b60605f5f5f61258185612622565b90925090505f828015612596576125966138e9565b0361261b57808060200190518101906125af9190613a28565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa1580156125e9573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526126109190810190613f43565b935093505050915091565b5050915091565b5f6060828060200190518101906126399190613cb2565b9094909350915050565b5f5f60205f8451602086015f885af180612662576040513d5f823e3d81fd5b50505f513d91508115612679578060011415612686565b6001600160a01b0384163b155b15610606576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161021a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526127328482612c40565b610606576040516001600160a01b0384811660248301525f604483015261276691869182169063095ea7b3906064016112e3565b6106068482612643565b5f5f5f5f5f5f61277f87612148565b939850919650945092509050600185600981111561279f5761279f6138e9565b03612827575f838060200190518101906127b99190613a28565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061281b919061364b565b98975050505050505050565b5f8180602001905181019061283c9190613b86565b5090505f61285687878787866001600160801b0316612c89565b909850905087811015612867578097505b50505050505050919050565b5f6001600160801b038211156128bf576040517f6dfcc650000000000000000000000000000000000000000000000000000000008152608060048201526024810183905260440161021a565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206141285f395f51905f52905f9067ffffffffffffffff81111561291657612916613028565b60405190808252806020026020018201604052801561293f578160200160208202803683370190505b5092505b845181101561299a575f85828151811061295f5761295f613991565b60200260200101519050612974878285612d26565b84838151811061298657612986613991565b602090810291909101015250600101612943565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612a1e576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206141285f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612b1557612b156138e9565b03612b295750670de0b6b3a7640000612142565b5080612142565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612b6f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b939190613ff7565b509350509250505f82131580612bb7575063ffffffff8416612bb58242613676565b115b15612bee576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612c2157612c0485600a61411c565b612c0e838a613bc5565b612c189190613bf0565b92505050612c37565b81612c2d86600a61411c565b612c0e908a613bc5565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612c7f57508115612c715780600114612c7f565b5f866001600160a01b03163b115b9695505050505050565b5f5f612c9e86670de0b6b3a764000086612175565b9050612cab878287612175565b9150612cbf670de0b6b3a764000083613bc5565b612cd184670de0b6b3a7640000613676565b612cdb9083613bc5565b108015612d135750612cf583670de0b6b3a7640000613a69565b612cff9082613bc5565b612d11670de0b6b3a764000084613bc5565b105b15612d1c578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612d50918691612e46565b90506001600160a01b038316612ddc5781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612dc1575f5ffd5b505af1158015612dd3573d5f5f3e3d5ffd5b50505050612df2565b8154612df2906001600160a01b031684836112b6565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f612e538686612ef6565b91509150815f03612e7757838181612e6d57612e6d613bdc565b049250505061083d565b818411612e8e57612e8e6003851502601118612f12565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102a29190612ff2565b508054612f5190613613565b5f825580601f10612f60575050565b601f0160209004905f5260205f20908101906102a29190612ff2565b5080545f8255905f5260205f20908101906102a29190612ff2565b828054828255905f5260205f20908101928215612fea579160200282015b82811115612fea57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612fb5565b506128bf9291505b5b808211156128bf575f8155600101612ff3565b6001600160a01b03811681146102a2575f5ffd5b60ff811681146102a2575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561305f5761305f613028565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561308e5761308e613028565b604052919050565b5f67ffffffffffffffff8211156130af576130af613028565b50601f01601f191660200190565b5f82601f8301126130cc575f5ffd5b81356130df6130da82613096565b613065565b8181528460208386010111156130f3575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f60608486031215613121575f5ffd5b833561312c81613006565b9250602084013561313c8161301a565b9150604084013567ffffffffffffffff811115613157575f5ffd5b613163868287016130bd565b9150509250925092565b5f6020828403121561317d575f5ffd5b813561083d81613006565b80151581146102a2575f5ffd5b80356131a081613188565b919050565b5f5f604083850312156131b6575f5ffd5b82356131c181613006565b915060208301356131d181613188565b809150509250929050565b5f67ffffffffffffffff8211156131f5576131f5613028565b5060051b60200190565b5f5f5f60608486031215613211575f5ffd5b833561321c81613006565b9250602084013561322c81613188565b9150604084013567ffffffffffffffff811115613247575f5ffd5b840160408187031215613258575f5ffd5b61326061303c565b813567ffffffffffffffff811115613276575f5ffd5b8201601f81018813613286575f5ffd5b80356132946130da826131dc565b8082825260208201915060208360051b85010192508a8311156132b5575f5ffd5b6020840193505b828410156132e05783356132cf81613006565b8252602093840193909101906132bc565b8452505050602082013567ffffffffffffffff8111156132fe575f5ffd5b61330a888285016130bd565b60208301525080925050509250925092565b5f6020828403121561332c575f5ffd5b813567ffffffffffffffff8116811461083d575f5ffd5b5f5f5f5f60808587031215613356575f5ffd5b843561336181613006565b9350602085013561337181613006565b9250604085013561338181613006565b9396929550929360600135925050565b600281106102a2575f5ffd5b5f5f604083850312156133ae575f5ffd5b82356133b981613006565b915060208301356131d181613391565b5f5f604083850312156133da575f5ffd5b82356133e581613006565b946020939093013593505050565b5f5f5f60608486031215613405575f5ffd5b833561341081613006565b9250602084013561342081613006565b929592945050506040919091013590565b5f5f60408385031215613442575f5ffd5b823561344d81613006565b9150602083013567ffffffffffffffff811115613468575f5ffd5b613474858286016130bd565b9150509250929050565b6001600160801b03811681146102a2575f5ffd5b5f5f5f606084860312156134a4575f5ffd5b83356134af81613006565b925060208401356134bf8161347e565b915060408401356134cf81613188565b809150509250925092565b5f82601f8301126134e9575f5ffd5b81356134f76130da826131dc565b8082825260208201915060208360051b860101925085831115613518575f5ffd5b602085015b8381101561353557803583526020928301920161351d565b5095945050505050565b5f5f5f60608486031215613551575f5ffd5b833567ffffffffffffffff811115613567575f5ffd5b8401601f81018613613577575f5ffd5b80356135856130da826131dc565b8082825260208201915060208360051b8501019250888311156135a6575f5ffd5b6020840193505b828410156135d15783356135c081613006565b8252602093840193909101906135ad565b9550505050602084013567ffffffffffffffff8111156135ef575f5ffd5b6135fb868287016134da565b92505061360a60408501613195565b90509250925092565b600181811c9082168061362757607f821691505b60208210810361364557634e487b7160e01b5f52602260045260245ffd5b50919050565b5f6020828403121561365b575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561214257612142613662565b5f5f85851115613697575f5ffd5b838611156136a3575f5ffd5b5050820193919092039150565b80357fffffffff00000000000000000000000000000000000000000000000000000000811690600484101561370f577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561022e57805f5260205f20601f840160051c810160208510156137795750805b601f840160051c820191505b81811015613798575f8155600101613785565b5050505050565b815167ffffffffffffffff8111156137b9576137b9613028565b6137cd816137c78454613613565b84613754565b6020601f8211600181146137ff575f83156137e85750848201515b5f19600385901b1c1916600184901b178455613798565b5f84815260208120601f198516915b8281101561382e578785015182556020948501946001909201910161380e565b508482101561384b57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f845461386b81613613565b806040860152600182165f811461388957600181146138a5576138d6565b60ff1983166060870152606082151560051b87010193506138d6565b875f5260205f205f5b838110156138cd578154888201606001526001909101906020016138ae565b87016060019450505b50505060ff84166020840152905061083d565b634e487b7160e01b5f52602160045260245ffd5b600a811061390d5761390d6138e9565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b61394981876138fd565b61395660208201866138fd565b60a060408201525f61396b60a0830186613911565b828103606084015261397d8186613911565b9050828103608084015261281b8185613911565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613a0a576001600160a01b0384511682526020820191506020840193506001830192506139de565b506020860151858203601f190160408701529250612c7f8184613911565b5f60208284031215613a38575f5ffd5b815161083d81613006565b82151581526040810160028310613a5c57613a5c6138e9565b8260208301529392505050565b8082018082111561214257612142613662565b8051600a81106131a0575f5ffd5b5f82601f830112613a99575f5ffd5b8151613aa76130da82613096565b818152846020838601011115613abb575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613aeb575f5ffd5b613af486613a7c565b9450613b0260208701613a7c565b9350604086015167ffffffffffffffff811115613b1d575f5ffd5b613b2988828901613a8a565b935050606086015167ffffffffffffffff811115613b45575f5ffd5b613b5188828901613a8a565b925050608086015167ffffffffffffffff811115613b6d575f5ffd5b613b7988828901613a8a565b9150509295509295909350565b5f5f60408385031215613b97575f5ffd5b8251613ba28161347e565b60208401519092506131d18161347e565b602081525f61083d6020830184613911565b808202811582820484141761214257612142613662565b634e487b7160e01b5f52601260045260245ffd5b5f82613c0a57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b03818116838216019081111561214257612142613662565b6001600160801b03818116838216019081111561214257612142613662565b6001600160d81b03828116828216039081111561214257612142613662565b6001600160801b03828116828216039081111561214257612142613662565b5f60208284031215613c9b575f5ffd5b815161083d8161301a565b600181106102a2575f5ffd5b5f5f60408385031215613cc3575f5ffd5b8251613cce81613ca6565b602084015190925067ffffffffffffffff811115613cea575f5ffd5b61347485828601613a8a565b5f60208284031215613d06575f5ffd5b815161083d81613188565b5f82601f830112613d20575f5ffd5b8151613d2e6130da826131dc565b8082825260208201915060208360051b860101925085831115613d4f575f5ffd5b602085015b8381101561353557805163ffffffff81168114613d6f575f5ffd5b835260209283019201613d54565b5f82601f830112613d8c575f5ffd5b8151613d9a6130da826131dc565b8082825260208201915060208360051b860101925085831115613dbb575f5ffd5b602085015b83811015613535578051613dd38161301a565b835260209283019201613dc0565b80516131a081613391565b5f5f5f5f5f60a08688031215613e00575f5ffd5b855167ffffffffffffffff811115613e16575f5ffd5b8601601f81018813613e26575f5ffd5b8051613e346130da826131dc565b8082825260208201915060208360051b85010192508a831115613e55575f5ffd5b6020840193505b82841015613e80578351613e6f81613006565b825260209384019390910190613e5c565b80985050505050602086015167ffffffffffffffff811115613ea0575f5ffd5b613eac88828901613d11565b945050604086015167ffffffffffffffff811115613ec8575f5ffd5b613ed488828901613d7d565b935050606086015167ffffffffffffffff811115613ef0575f5ffd5b613efc88828901613d7d565b925050613f0b60808701613de1565b90509295509295909350565b5f5f60408385031215613f28575f5ffd5b8251613f3381613006565b6020939093015192949293505050565b5f5f60408385031215613f54575f5ffd5b825167ffffffffffffffff811115613f6a575f5ffd5b8301601f81018513613f7a575f5ffd5b8051613f886130da826131dc565b8082825260208201915060208360051b850101925087831115613fa9575f5ffd5b6020840193505b82841015613fcb578351825260209384019390910190613fb0565b6020969096015195979596505050505050565b805169ffffffffffffffffffff811681146131a0575f5ffd5b5f5f5f5f5f60a0868803121561400b575f5ffd5b61401486613fde565b60208701516040880151606089015192975090955093509150613f0b60808701613fde565b6001815b60018411156140745780850481111561405857614058613662565b600184161561406657908102905b60019390931c92800261403d565b935093915050565b5f8261408a57506001612142565b8161409657505f612142565b81600181146140ac57600281146140b6576140d2565b6001915050612142565b60ff8411156140c7576140c7613662565b50506001821b612142565b5060208310610133831016604e8410600b84101617156140f5575081810a612142565b6141015f198484614039565b805f190482111561411457614114613662565b029392505050565b5f61083d838361407c56fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a26469706673582212200df2298cf5ace785ae612277d41cfb1b7ce0fc7026c1bac4f82af2cca81dc34364736f6c634300081c0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506143348061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100f0575f3560e01c80637c0343a111610093578063c1cdee7e11610063578063c1cdee7e146101c7578063c9580804146101da578063dd94be04146101ed578063f0d2d5a814610200575f5ffd5b80637c0343a11461017b57806383eae17b1461018e57806387c8ab7a146101a1578063b13b0847146101b4575f5ffd5b80634591f148116100ce5780634591f1481461012f5780634d2b3e1414610142578063561c14c4146101555780635c3eebda14610168575f5ffd5b80631b0c7182146100f45780631cb44dfc14610109578063412736571461011c575b5f5ffd5b6101076101023660046132c6565b610213565b005b610107610117366004613324565b610251565b61010761012a366004613324565b6102c3565b61010761013d36600461335c565b6102f5565b6101076101503660046133b6565b61032c565b6101076101633660046134d3565b610360565b6101076101763660046134fa565b610392565b610107610189366004613554565b610501565b61010761019c366004613580565b610534565b6101076101af3660046135aa565b610567565b6101076101c23660046135e8565b61065c565b6101076101d5366004613649565b61068f565b6101076101e8366004613324565b6106c3565b6101076101fb3660046136f6565b6106f5565b61010761020e366004613324565b610729565b61021e335f3661075b565b6102415760405162d1953b60e31b81523360048201526024015b60405180910390fd5b61024c838383610894565b505050565b335f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7c602052604081205490036102b7576040517fc22a648e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102c0816109e5565b50565b6102ce335f3661075b565b6102ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081610c98565b610300335f3661075b565b61031e5760405162d1953b60e31b8152336004820152602401610238565b6103288282610d40565b5050565b610337335f3661075b565b6103555760405162d1953b60e31b8152336004820152602401610238565b61024c8383836110e9565b61036b335f3661075b565b6103895760405162d1953b60e31b8152336004820152602401610238565b6102c08161129b565b61039d335f3661075b565b6103bb5760405162d1953b60e31b8152336004820152602401610238565b6001600160a01b0384165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260409020805460ff161561049957610494848484846007016001018054610413906137ca565b80601f016020809104026020016040519081016040528092919081815260200182805461043f906137ca565b801561048a5780601f106104615761010080835404028352916020019161048a565b820191905f5260205f20905b81548152906001019060200180831161046d57829003601f168201915b5050505050611369565b6104ad565b6104ad6001600160a01b038516848461142b565b826001600160a01b0316846001600160a01b03167ffff3b3844276f57024e0b42afec1a37f75db36511e43819a4f2a63ab7862b648846040516104f291815260200190565b60405180910390a35050505050565b61050c335f3661075b565b61052a5760405162d1953b60e31b8152336004820152602401610238565b610328828261148a565b61053f335f3661075b565b61055d5760405162d1953b60e31b8152336004820152602401610238565b610328828261157b565b610572335f3661075b565b6105905760405162d1953b60e31b8152336004820152602401610238565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa1580156105dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106019190613802565b90508181101561062f5761062a83610619838561382d565b6001600160a01b038716919061163b565b610656565b818111156106565761065683610645848461382d565b6001600160a01b03871691906116c2565b50505050565b610667335f3661075b565b6106855760405162d1953b60e31b8152336004820152602401610238565b6103288282611795565b61069a335f3661075b565b6106b85760405162d1953b60e31b8152336004820152602401610238565b61024c8383836118c3565b6106ce335f3661075b565b6106ec5760405162d1953b60e31b8152336004820152602401610238565b6102c081611b87565b610700335f3661075b565b61071e5760405162d1953b60e31b8152336004820152602401610238565b61024c838383611c5e565b610734335f3661075b565b6107525760405162d1953b60e31b8152336004820152602401610238565b6102c081611f3e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d545f906001600160a01b031681806107ab83883061079d6004868b8d613840565b6107a691613867565b612087565b91509150816108855763ffffffff81161561087a575f5160206142df5f395f51905f52805460ff60b01b19167601000000000000000000000000000000000000000000001781556040517f94c7d7ee0000000000000000000000000000000000000000000000000000000081526001600160a01b038516906394c7d7ee9061083b908b908b908b906004016138cd565b5f604051808303815f87803b158015610852575f5ffd5b505af1158015610864573d5f5f3e3d5ffd5b5050825460ff60b01b1916909255506108859050565b5f935050505061088d565b600193505050505b9392505050565b60018260ff1611156108d2576040517fd5fb0c3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361093657604051630dcfc57f60e21b815260040160405180910390fd5b8260ff166001036109605761094b823061214a565b506006810161095a8382613956565b5061097f565b60408051602081019091525f8152600682019061097d9082613956565b505b805464ff00000000191664010000000060ff8516021781556040516001600160a01b038516907f191460c727cbee9e6c46ead7c01c84a1fe8f0b99186af38917ac57de17e6ba99906109d79060068501908790613a11565b60405180910390a250505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a60205260408120545f5160206142df5f395f51905f5291630100000090910460ff169003610a5557604051630dcfc57f60e21b815260040160405180910390fd5b5f5f5f5f5f610b11866005015f896001600160a01b03166001600160a01b031681526020019081526020015f206005018054610a90906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610abc906137ca565b8015610b075780601f10610ade57610100808354040283529160200191610b07565b820191905f5260205f20905b815481529060010190602001808311610aea57829003601f168201915b50505050506122bd565b9398509196509450925090506008846009811115610b3157610b31613aa0565b14610b4f57604051635516a7db60e11b815260040160405180910390fd5b5f610b6386670de0b6b3a7640000866122ea565b90505f83806020019051810190610b7a9190613802565b90508082111580610bbd5750610b9f66b1a2bc2ec50000670de0b6b3a7640000613ab4565b610ba99082613ac7565b610bbb670de0b6b3a764000084613ac7565b115b15610bdb57604051635516a7db60e11b815260040160405180910390fd5b86868684604051602001610bf191815260200190565b60408051601f1981840301815290829052610c13949392918890602001613b20565b60408051601f198184030181529181526001600160a01b038b165f9081526005808c016020529190200190610c489082613956565b5060408051828152602081018490526001600160a01b038b16917f8d1ba64ec7e754c448f8fc563a78c865de6719a0ed302eb3307b92b4ddaf27d4910160405180910390a2505050505050505050565b6001600160a01b038116610cd8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8480546001600160a01b0319166001600160a01b0383169081179091556040517f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df905f90a250565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff169003610db157604051630dcfc57f60e21b815260040160405180910390fd5b80546501000000000090046001600160d81b031615610dfc576040517fba80a36400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460ff168015801590610e0d5750835b15610ecd575f610ea9836007016001018054610e28906137ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610e54906137ca565b8015610e9f5780601f10610e7657610100808354040283529160200191610e9f565b820191905f5260205f20905b815481529060010190602001808311610e8257829003601f168201915b50505050506126e8565b9150508015610ecb576040516309e7761b60e41b815260040160405180910390fd5b505b6001600160a01b0385165f908152600584016020526040812081815590610ef760018301826130da565b610f04600283015f6130da565b610f11600383015f6130da565b610f1e600483015f6130da565b610f2b600583015f6130fc565b610f38600683015f6130fc565b600782015f610f478282613133565b610f54600183015f6130fc565b5050600982015f905550505f83600201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610f98575b505083519394505f925050505b610fce60018361382d565b81101561107857876001600160a01b0316838281518110610ff157610ff1613b72565b60200260200101516001600160a01b031603611070578261101360018461382d565b8151811061102357611023613b72565b602002602001015186600201828154811061104057611040613b72565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550611078565b600101610fc3565b508460020180548061108c5761108c613b86565b5f8281526020812082015f1990810180546001600160a01b03191690559091019091556040516001600160a01b038916917f10d8ed8cba916885e339cb21deefb3842b3f417eac81a7f34b2978b4ecc2040f91a250505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff16900361114d57604051630dcfc57f60e21b815260040160405180910390fd5b805460ff16801580159061115e5750835b1561119d575f611179836007016001018054610e28906137ca565b915050801561119b576040516309e7761b60e41b815260040160405180910390fd5b505b6020830151511561121557846001600160a01b0316835f01515f815181106111c7576111c7613b72565b60200260200101516001600160a01b0316146111f657604051635435b28960e11b815260040160405180910390fd5b6112038360200151612797565b5050815460ff1916600117825561121e565b815460ff191682555b825180518491600785019161123a91839160209091019061314e565b506020820151600182019061124f9082613956565b50905050846001600160a01b03167f174af9868421277c39ff3056a92d06c83d74df4c7f64258add97ea2bdc022d818460405161128c9190613b9a565b60405180910390a25050505050565b633b9aca0067ffffffffffffffff821610156112e3576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7f805467ffffffffffffffff831667ffffffffffffffff19909116811790915560408051918252515f5160206142df5f395f51905f52917fd10846add063582adb6e1c2f4392fd53c43643197b1cbfff38b5aff8d656d17c919081900360200190a15050565b5f5f61137483612797565b90925090505f82801561138957611389613aa0565b0361142357808060200190518101906113a29190613c09565b6040517f8bfb07c90000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301528781166024830152604482018790529190911690638bfb07c9906064015f604051808303815f87803b15801561140c575f5ffd5b505af115801561141e573d5f5f3e3d5ffd5b505050505b505050505050565b6040516001600160a01b0383811660248301526044820183905261024c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506127b8565b5f5160206142df5f395f51905f525f808360018111156114ac576114ac613aa0565b036114f9576001600160a01b0384165f9081526006830160205260409020546114d690600161382d565b6001600160a01b0385165f9081526006840160205260409020819055905061153d565b6001600160a01b0384165f90815260078301602052604090205461151e90600161382d565b6001600160a01b0385165f908152600784016020526040902081905590505b836001600160a01b03167ff659c9a30c41638c696d64b6e8cc1ee8fff543e973ffc1e9e2d794225ae0178a82600114856040516109d7929190613c24565b633b9aca008111156115b9576040517f6a43f8d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7e602090815260409182902084905590518381525f5160206142df5f395f51905f5292917fb3a17cf8bbe3a4348266beede3a365af15dd59203021a6c1121d00ca2d5019f7910160405180910390a2505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa158015611688573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116ac9190613802565b905061065684846116bd8585613ab4565b61283d565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301525f919085169063dd62ed3e90604401602060405180830381865afa15801561170f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117339190613802565b905081811015611788576040517fe570110f0000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610238565b610656848484840361283d565b6001600160a01b0382165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080549091630100000090910460ff1690036117f957604051630dcfc57f60e21b815260040160405180910390fd5b5f8280602001905181019061180e9190613ca5565b9450505050505f5f8280602001905181019061182a9190613d54565b91509150806001600160801b0316826001600160801b0316111561186157604051635435b28960e11b815260040160405180910390fd5b61186a856128e5565b50600584016118798682613956565b50856001600160a01b03167fba11329c0b0f98b91c254755aa8d698feac3b46fab65b65fe5ab7570de2ff928866040516118b39190613d81565b60405180910390a2505050505050565b6001600160a01b0383165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040812080545f5160206142df5f395f51905f5292630100000090910460ff16900361193457604051630dcfc57f60e21b815260040160405180910390fd5b60018201545f90611987906001600160801b03700100000000000000000000000000000000909104811690611978906b033b2e3c9fd0803ce8000000908916613ac7565b6119829190613da7565b6129e8565b90508315611aad5781546119b7906001600160801b038316906501000000000090046001600160d81b0316613dc6565b82546001600160d81b0391909116650100000000000264ffffffffff90911617825560018301546119f29082906001600160801b0316613de5565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b0392831617908190556009840154845490926b033b2e3c9fd0803ce800000092611a6692700100000000000000000000000000000000909104909116906501000000000090046001600160d81b0316613ac7565b611a709190613da7565b1115611aa8576040517f4d1dd38900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b3c565b8154611ad5906001600160801b038316906501000000000090046001600160d81b0316613e04565b82546001600160d81b0391909116650100000000000264ffffffffff9091161782556001830154611b109082906001600160801b0316613e23565b6001840180546fffffffffffffffffffffffffffffffff19166001600160801b03929092169190911790555b604080516001600160801b038716815285151560208201526001600160a01b038816917f2347e219eb6e83e63152eb917ddb1df919c0f9208fa91dda0bd14822c6be1d0791016118b3565b806001600160a01b03163b5f03611bca576040517fa98154e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d80546001600160a01b031981166001600160a01b038481169182179093556040517fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b82511580611c6d5750600a8351115b15611ca4576040517f1df89e8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151835114611cdf576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5160206142df5f395f51905f5281611df65780546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611d50573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d749190613802565b90505f81118015611d885750600d82015415155b15611df457611df18183600d01805480602002602001604051908101604052809291908181526020018280548015611de757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611dc9575b5050505050612a38565b50505b505b5f5b600d820154811015611e4b575f82600e015f84600d018481548110611e1f57611e1f613b72565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101611df8565b611e58600d83015f613133565b505f805b8551821015611f2f575f5b82811015611edb57868381518110611e8157611e81613b72565b60200260200101516001600160a01b0316878281518110611ea457611ea4613b72565b60200260200101516001600160a01b031603611ed35760405163f411c32760e01b815260040160405180910390fd5b600101611e67565b50611f18868381518110611ef157611ef1613b72565b6020026020010151868481518110611f0b57611f0b613b72565b6020026020010151612b59565b611f229082613ab4565b9050816001019150611e5c565b600c9092019190915550505050565b6001600160a01b0381165f9081527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c7a6020526040902080545f5160206142df5f395f51905f5291906301000000900460ff1615611fae5760405163f411c32760e01b815260040160405180910390fd5b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200e9190613e42565b815460ff9190911663010000000263ff000000199091161781556002820180546001810182555f918252602082200180546001600160a01b0386166001600160a01b0319909116811790915560405190917f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f91a2505050565b6040516001600160a01b038085166024830152831660448201527fffffffff00000000000000000000000000000000000000000000000000000000821660648201525f908190819060840160408051601f19818403018152918152602080830180516001600160e01b03167fb7009613000000000000000000000000000000000000000000000000000000001781525f808052918290528351939450919290918a5afa15612140575f516020805191945081901c150291505b5094509492505050565b5f5f5f848060200190518101906121619190613e69565b915091505f61217a5f5160206142df5f395f51905f5290565b6008015f84801561218d5761218d613aa0565b801561219b5761219b613aa0565b81526020019081526020015f205f866001600160a01b03166001600160a01b031681526020019081526020015f205411156121db576001925050506122b7565b8051156122b1575f8280156121f2576121f2613aa0565b036122b1575f8180602001905181019061220c9190613c09565b90506001600160a01b038116156122af576040517f65e4ad9e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0386811660248301528216906365e4ad9e906044016020604051808303815f875af1158015612281573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a59190613ead565b93505050506122b7565b505b5f925050505b92915050565b5f5f6060806060858060200190518101906122d89190613ca5565b939a9299509097509550909350915050565b5f808460098111156122fe576122fe613aa0565b036123ce575f5f5f5f5f8680602001905181019061231c9190613fa3565b945094509450945094505f612331828a612cb8565b86519091505f5b818110156123be576123b48389838151811061235657612356613b72565b602002602001015188848151811061237057612370613b72565b602002602001015188858151811061238a5761238a613b72565b602002602001015160ff168b86815181106123a7576123a7613b72565b6020026020010151612ce7565b9250600101612338565b508197505050505050505061088d565b60038460098111156123e2576123e2613aa0565b036123f65750670de0b6b3a764000061088d565b600284600981111561240a5761240a613aa0565b0361241657508161088d565b600484600981111561242a5761242a613aa0565b036124c8576040517f7a28fb88000000000000000000000000000000000000000000000000000000008152670de0b6b3a7640000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe8490637a28fb8890602401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124c19190613802565b905061088d565b60058460098111156124dc576124dc613aa0565b036125315773be9895146f7af43049ca1c1ae358b0541ea497046001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600684600981111561254557612545613aa0565b0361259a5773ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b60078460098111156125ae576125ae613aa0565b036126035773ac3e018457b222d93114458476f3e3416abbe38f6001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa15801561249d573d5f5f3e3d5ffd5b600884600981111561261757612617613aa0565b0361263a575f828060200190518101906126319190613802565b915061088d9050565b600984600981111561264e5761264e613aa0565b036126e1575f5f8380602001905181019061266991906140ce565b9150915080826001600160a01b031663a035b1fe6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126aa573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126ce9190613802565b6126d89190613da7565b9250505061088d565b508161088d565b60605f5f5f6126f685612797565b90925090505f82801561270b5761270b613aa0565b0361279057808060200190518101906127249190613c09565b6001600160a01b03166301e1d1146040518163ffffffff1660e01b81526004015f60405180830381865afa15801561275e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261278591908101906140fa565b935093505050915091565b5050915091565b5f6060828060200190518101906127ae9190613e69565b9094909350915050565b5f5f60205f8451602086015f885af1806127d7576040513d5f823e3d81fd5b50505f513d915081156127ee5780600114156127fb565b6001600160a01b0384163b155b15610656576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610238565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790526128a78482612df7565b610656576040516001600160a01b0384811660248301525f60448301526128db91869182169063095ea7b390606401611458565b61065684826127b8565b5f5f5f5f5f5f6128f4876122bd565b939850919650945092509050600185600981111561291457612914613aa0565b0361299c575f8380602001905181019061292e9190613c09565b9050806001600160a01b0316635ade93556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561296c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129909190613802565b98975050505050505050565b5f818060200190518101906129b19190613d54565b5090505f6129cb87878787866001600160801b0316612e40565b9098509050878110156129dc578097505b50505050505050919050565b5f6001600160801b03821115612a34576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526080600482015260248101839052604401610238565b5090565b427f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c8055805160609081905f5160206142df5f395f51905f52905f9067ffffffffffffffff811115612a8b57612a8b6131df565b604051908082528060200260200182016040528015612ab4578160200160208202803683370190505b5092505b8451811015612b0f575f858281518110612ad457612ad4613b72565b60200260200101519050612ae9878285612edd565b848381518110612afb57612afb613b72565b602090810291909101015250600101612ab8565b600b8201546040805188815260208101929092527f141751092cf7f1b8dd572383f04983a12e1767842801592e3f37663cc7945ad5910160405180910390a1509294909350915050565b5f815f03612b93576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b306001600160a01b03841603612bd5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c828054600181019091557fbc23df6a4455ba59ecbb7370f929cc2ed02454c98c8e7c9671c82c6d946778300180546001600160a01b0319166001600160a01b0385169081179091555f8181527f4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c836020908152604091829020859055815185815291515f5160206142df5f395f51905f5293927f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac92908290030190a2509092915050565b5f80836001811115612ccc57612ccc613aa0565b03612ce05750670de0b6b3a76400006122b7565b50806122b7565b5f5f5f866001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612d26573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4a91906141ae565b509350509250505f82131580612d6e575063ffffffff8416612d6c824261382d565b115b15612da5576040517fae19356300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff16600103612dd857612dbb85600a6142d3565b612dc5838a613ac7565b612dcf9190613da7565b92505050612dee565b81612de486600a6142d3565b612dc5908a613ac7565b95945050505050565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015612e3657508115612e285780600114612e36565b5f866001600160a01b03163b115b9695505050505050565b5f5f612e5586670de0b6b3a7640000866122ea565b9050612e628782876122ea565b9150612e76670de0b6b3a764000083613ac7565b612e8884670de0b6b3a764000061382d565b612e929083613ac7565b108015612eca5750612eac83670de0b6b3a7640000613ab4565b612eb69082613ac7565b612ec8670de0b6b3a764000084613ac7565b105b15612ed3578091505b9550959350505050565b6001600160a01b0382165f908152600e82016020526040812054600c830154612f07918691612ffd565b90506001600160a01b038316612f935781546040517f2b471d8e000000000000000000000000000000000000000000000000000000008152600481018390523060248201526001600160a01b0390911690632b471d8e906044015f604051808303815f87803b158015612f78575f5ffd5b505af1158015612f8a573d5f5f3e3d5ffd5b50505050612fa9565b8154612fa9906001600160a01b0316848361142b565b600b820154604080518381526001600160a01b038616602082015280820192909252517f17265974e980c0c028871fefa3438a14d11f8008db1fe6da5d98c45bf64a64c89181900360600190a19392505050565b5f5f5f61300a86866130ad565b91509150815f0361302e5783818161302457613024613d93565b049250505061088d565b8184116130455761304560038515026011186130c9565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b5080545f825560030160049004905f5260205f20908101906102c091906131a9565b508054613108906137ca565b5f825580601f10613117575050565b601f0160209004905f5260205f20908101906102c091906131a9565b5080545f8255905f5260205f20908101906102c091906131a9565b828054828255905f5260205f209081019282156131a1579160200282015b828111156131a157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061316c565b50612a349291505b5b80821115612a34575f81556001016131aa565b6001600160a01b03811681146102c0575f5ffd5b60ff811681146102c0575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613216576132166131df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613245576132456131df565b604052919050565b5f67ffffffffffffffff821115613266576132666131df565b50601f01601f191660200190565b5f82601f830112613283575f5ffd5b81356132966132918261324d565b61321c565b8181528460208386010111156132aa575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f606084860312156132d8575f5ffd5b83356132e3816131bd565b925060208401356132f3816131d1565b9150604084013567ffffffffffffffff81111561330e575f5ffd5b61331a86828701613274565b9150509250925092565b5f60208284031215613334575f5ffd5b813561088d816131bd565b80151581146102c0575f5ffd5b80356133578161333f565b919050565b5f5f6040838503121561336d575f5ffd5b8235613378816131bd565b915060208301356133888161333f565b809150509250929050565b5f67ffffffffffffffff8211156133ac576133ac6131df565b5060051b60200190565b5f5f5f606084860312156133c8575f5ffd5b83356133d3816131bd565b925060208401356133e38161333f565b9150604084013567ffffffffffffffff8111156133fe575f5ffd5b84016040818703121561340f575f5ffd5b6134176131f3565b813567ffffffffffffffff81111561342d575f5ffd5b8201601f8101881361343d575f5ffd5b803561344b61329182613393565b8082825260208201915060208360051b85010192508a83111561346c575f5ffd5b6020840193505b82841015613497578335613486816131bd565b825260209384019390910190613473565b8452505050602082013567ffffffffffffffff8111156134b5575f5ffd5b6134c188828501613274565b60208301525080925050509250925092565b5f602082840312156134e3575f5ffd5b813567ffffffffffffffff8116811461088d575f5ffd5b5f5f5f5f6080858703121561350d575f5ffd5b8435613518816131bd565b93506020850135613528816131bd565b92506040850135613538816131bd565b9396929550929360600135925050565b600281106102c0575f5ffd5b5f5f60408385031215613565575f5ffd5b8235613570816131bd565b9150602083013561338881613548565b5f5f60408385031215613591575f5ffd5b823561359c816131bd565b946020939093013593505050565b5f5f5f606084860312156135bc575f5ffd5b83356135c7816131bd565b925060208401356135d7816131bd565b929592945050506040919091013590565b5f5f604083850312156135f9575f5ffd5b8235613604816131bd565b9150602083013567ffffffffffffffff81111561361f575f5ffd5b61362b85828601613274565b9150509250929050565b6001600160801b03811681146102c0575f5ffd5b5f5f5f6060848603121561365b575f5ffd5b8335613666816131bd565b9250602084013561367681613635565b915060408401356136868161333f565b809150509250925092565b5f82601f8301126136a0575f5ffd5b81356136ae61329182613393565b8082825260208201915060208360051b8601019250858311156136cf575f5ffd5b602085015b838110156136ec5780358352602092830192016136d4565b5095945050505050565b5f5f5f60608486031215613708575f5ffd5b833567ffffffffffffffff81111561371e575f5ffd5b8401601f8101861361372e575f5ffd5b803561373c61329182613393565b8082825260208201915060208360051b85010192508883111561375d575f5ffd5b6020840193505b82841015613788578335613777816131bd565b825260209384019390910190613764565b9550505050602084013567ffffffffffffffff8111156137a6575f5ffd5b6137b286828701613691565b9250506137c16040850161334c565b90509250925092565b600181811c908216806137de57607f821691505b6020821081036137fc57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215613812575f5ffd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156122b7576122b7613819565b5f5f8585111561384e575f5ffd5b8386111561385a575f5ffd5b5050820193919092039150565b80357fffffffff0000000000000000000000000000000000000000000000000000000081169060048410156138c6577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b6001600160a01b038416815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b601f82111561024c57805f5260205f20601f840160051c810160208510156139305750805b601f840160051c820191505b8181101561394f575f815560010161393c565b5050505050565b815167ffffffffffffffff811115613970576139706131df565b6139848161397e84546137ca565b8461390b565b6020601f8211600181146139b6575f831561399f5750848201515b5f19600385901b1c1916600184901b17845561394f565b5f84815260208120601f198516915b828110156139e557878501518255602094850194600190920191016139c5565b5084821015613a0257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b604081525f5f8454613a22816137ca565b806040860152600182165f8114613a405760018114613a5c57613a8d565b60ff1983166060870152606082151560051b8701019350613a8d565b875f5260205f205f5b83811015613a8457815488820160600152600190910190602001613a65565b87016060019450505b50505060ff84166020840152905061088d565b634e487b7160e01b5f52602160045260245ffd5b808201808211156122b7576122b7613819565b80820281158282048414176122b7576122b7613819565b600a8110613aee57613aee613aa0565b9052565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b613b2a8187613ade565b613b376020820186613ade565b60a060408201525f613b4c60a0830186613af2565b8281036060840152613b5e8186613af2565b905082810360808401526129908185613af2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b602080825282516040838301528051606084018190525f929190910190829060808501905b80831015613beb576001600160a01b038451168252602082019150602084019350600183019250613bbf565b506020860151858203601f190160408701529250612e368184613af2565b5f60208284031215613c19575f5ffd5b815161088d816131bd565b82151581526040810160028310613c3d57613c3d613aa0565b8260208301529392505050565b8051600a8110613357575f5ffd5b5f82601f830112613c67575f5ffd5b8151613c756132918261324d565b818152846020838601011115613c89575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f5f5f5f5f60a08688031215613cb9575f5ffd5b613cc286613c4a565b9450613cd060208701613c4a565b9350604086015167ffffffffffffffff811115613ceb575f5ffd5b613cf788828901613c58565b935050606086015167ffffffffffffffff811115613d13575f5ffd5b613d1f88828901613c58565b925050608086015167ffffffffffffffff811115613d3b575f5ffd5b613d4788828901613c58565b9150509295509295909350565b5f5f60408385031215613d65575f5ffd5b8251613d7081613635565b602084015190925061338881613635565b602081525f61088d6020830184613af2565b634e487b7160e01b5f52601260045260245ffd5b5f82613dc157634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160d81b0381811683821601908111156122b7576122b7613819565b6001600160801b0381811683821601908111156122b7576122b7613819565b6001600160d81b0382811682821603908111156122b7576122b7613819565b6001600160801b0382811682821603908111156122b7576122b7613819565b5f60208284031215613e52575f5ffd5b815161088d816131d1565b600181106102c0575f5ffd5b5f5f60408385031215613e7a575f5ffd5b8251613e8581613e5d565b602084015190925067ffffffffffffffff811115613ea1575f5ffd5b61362b85828601613c58565b5f60208284031215613ebd575f5ffd5b815161088d8161333f565b5f82601f830112613ed7575f5ffd5b8151613ee561329182613393565b8082825260208201915060208360051b860101925085831115613f06575f5ffd5b602085015b838110156136ec57805163ffffffff81168114613f26575f5ffd5b835260209283019201613f0b565b5f82601f830112613f43575f5ffd5b8151613f5161329182613393565b8082825260208201915060208360051b860101925085831115613f72575f5ffd5b602085015b838110156136ec578051613f8a816131d1565b835260209283019201613f77565b805161335781613548565b5f5f5f5f5f60a08688031215613fb7575f5ffd5b855167ffffffffffffffff811115613fcd575f5ffd5b8601601f81018813613fdd575f5ffd5b8051613feb61329182613393565b8082825260208201915060208360051b85010192508a83111561400c575f5ffd5b6020840193505b82841015614037578351614026816131bd565b825260209384019390910190614013565b80985050505050602086015167ffffffffffffffff811115614057575f5ffd5b61406388828901613ec8565b945050604086015167ffffffffffffffff81111561407f575f5ffd5b61408b88828901613f34565b935050606086015167ffffffffffffffff8111156140a7575f5ffd5b6140b388828901613f34565b9250506140c260808701613f98565b90509295509295909350565b5f5f604083850312156140df575f5ffd5b82516140ea816131bd565b6020939093015192949293505050565b5f5f6040838503121561410b575f5ffd5b825167ffffffffffffffff811115614121575f5ffd5b8301601f81018513614131575f5ffd5b805161413f61329182613393565b8082825260208201915060208360051b850101925087831115614160575f5ffd5b6020840193505b82841015614182578351825260209384019390910190614167565b6020969096015195979596505050505050565b805169ffffffffffffffffffff81168114613357575f5ffd5b5f5f5f5f5f60a086880312156141c2575f5ffd5b6141cb86614195565b602087015160408801516060890151929750909550935091506140c260808701614195565b6001815b600184111561422b5780850481111561420f5761420f613819565b600184161561421d57908102905b60019390931c9280026141f4565b935093915050565b5f82614241575060016122b7565b8161424d57505f6122b7565b8160018114614263576002811461426d57614289565b60019150506122b7565b60ff84111561427e5761427e613819565b50506001821b6122b7565b5060208310610133831016604e8410600b84101617156142ac575081810a6122b7565b6142b85f1984846141f0565b805f19048211156142cb576142cb613819565b029392505050565b5f61088d838361423356fe4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75a2646970667358221220267448d84bd781563949caeb1b4590cff220d6b31ffd62af8c37f2b79b199c6164736f6c634300081c0033", "linkReferences": {}, "deployedLinkReferences": {}, "immutableReferences": {}, @@ -759,6 +820,9 @@ "setCollateralManager(address,bool,(address[],bytes))": { "details": "Funds need to have been withdrawn from the eventual previous manager prior to this call" }, + "setSwapRouter(address)": { + "details": "The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold" + }, "updatePayees(address[],uint256[],bool)": { "params": { "_payees": "The new payee addresses", @@ -782,9 +846,9 @@ "evm": { "gasEstimates": { "creation": { - "codeDepositCost": "3353000", - "executionCost": "3729", - "totalCost": "3356729" + "codeDepositCost": "3440800", + "executionCost": "3842", + "totalCost": "3444642" }, "external": { "addCollateral(address)": "infinite", @@ -795,6 +859,7 @@ "setAccessManager(address)": "infinite", "setCollateralManager(address,bool,(address[],bytes))": "infinite", "setOracle(address,bytes)": "infinite", + "setSwapRouter(address)": "infinite", "setWhitelistStatus(address,uint8,bytes)": "infinite", "toggleTrusted(address,uint8)": "infinite", "updateOracle(address)": "infinite", @@ -804,12 +869,17 @@ } } }, - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xd4d195b62841c28dd5f248d09e682c3c81bda24b471cd8a5d8efe498519ea50d\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n}\\n\",\"keccak256\":\"0xaa7d137a74a6f51760acf46ff2ef777de831422d2fd8282ec683ac806af0ca3a\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n}\\n\",\"keccak256\":\"0x3d0d0351ef8f06a401c421d2f76b4227e4819935583ad29f44fc6dc59f5ea021\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n if (oracleValue > maxValue) {\\n ts.collaterals[collateral].oracleConfig = abi.encode(\\n oracleType,\\n targetType,\\n oracleData,\\n // There are no checks whether the value increased or not\\n abi.encode(oracleValue),\\n hyperparameters\\n );\\n } else {\\n revert OracleUpdateFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x068d08d7c0fcc337b07f96ace963fd7c56d5e2a33fd1ce99ba05f2216b97daac\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x9e41915e7fb03ef3b054f7ce0b7ab297e3b8f5c05ab1e7ebe072e22f11b22362\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\naddress constant ODOS_ROUTER = 0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x2beca19c6b45c5507a141f5ba0b5952e72480920220d46b673885bb088bf6ca0\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror OdosSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xa9abc94129bd5e0964585da120facf621e1edd31fcb234fe677d4e050a728f4d\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AboveCap\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArrayLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralBacked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAccessManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidChainlinkRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLengths\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParams\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWhitelistStatus\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ManagerHasAssets\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotTrusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleUpdateFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"CollateralManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"CollateralRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"}],\"name\":\"CollateralWhitelistStatusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"income\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"releasedAt\",\"type\":\"uint256\"}],\"name\":\"IncomeReleasedToPayee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousTarget\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTarget\",\"type\":\"uint256\"}],\"name\":\"OracleTargetUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"PayeeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"ReservesAdjusted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"SlippageToleranceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"SurplusBufferRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"SwapRouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTrusted\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"enum TrustedType\",\"name\":\"trustedType\",\"type\":\"uint8\"}],\"name\":\"TrustedToggled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"addCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"increase\",\"type\":\"bool\"}],\"name\":\"adjustStablecoins\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"changeAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"}],\"name\":\"revokeCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newAccessManager\",\"type\":\"address\"}],\"name\":\"setAccessManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"checkExternalManagerBalance\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"subCollaterals\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"internalType\":\"struct ManagerStorage\",\"name\":\"managerData\",\"type\":\"tuple\"}],\"name\":\"setCollateralManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"oracleConfig\",\"type\":\"bytes\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"swapRouter\",\"type\":\"address\"}],\"name\":\"setSwapRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"whitelistStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"whitelistData\",\"type\":\"bytes\"}],\"name\":\"setWhitelistStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"enum TrustedType\",\"name\":\"t\",\"type\":\"uint8\"}],\"name\":\"toggleTrusted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updateOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_payees\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_shares\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_skipRelease\",\"type\":\"bool\"}],\"name\":\"updatePayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"slippageTolerance\",\"type\":\"uint256\"}],\"name\":\"updateSlippageTolerance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_surplusBufferRatio\",\"type\":\"uint64\"}],\"name\":\"updateSurplusBufferRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cooper Labs\",\"custom:contact\":\"security@cooperlabs.xyz\",\"details\":\"This contract is an authorized fork of Angle's `SettersGovernor` contract https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\",\"errors\":{\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in an uint of `bits` size.\"}],\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"addCollateral(address)\":{\"details\":\"Collateral assets with a fee on transfer are not supported by the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"details\":\"The amount passed here must be an absolute amount\"},\"changeAllowance(address,address,uint256)\":{\"details\":\"This function can typically be used to grant allowance to a newly added manager for it to pull the funds associated to the collateral it corresponds to\"},\"recoverERC20(address,address,address,uint256)\":{\"details\":\"No check is made on the collateral that is redeemed: this function could typically be used by a governance during a manual rebalance of the reserves of the system`collateral` is different from `token` only in the case of a managed collateral\"},\"revokeCollateral(address,bool)\":{\"details\":\"Require `collatInfo.normalizedStables == 0`, that is to say that the collateral is not used to back stablesThe system may still have a non null balance of the collateral that is revoked: this should later be handled through a recoverERC20 callFunds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is true\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"details\":\"Funds need to have been withdrawn from the eventual previous manager prior to this call\"},\"setSwapRouter(address)\":{\"details\":\"The payload is executed with a raw call, so any router can be configured. It is chain specific and must be set on every deployment before rewards can be sold\"},\"updatePayees(address[],uint256[],bool)\":{\"params\":{\"_payees\":\"The new payee addresses\",\"_shares\":\"The new shares for each payee\",\"_skipRelease\":\"If true, skips the automatic income release before updating\"}},\"updateSlippageTolerance(address,uint256)\":{\"details\":\"Maximum slippage tolerance is 1e9 (100%)The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when calling the `processSurplus` function\"},\"updateSurplusBufferRatio(uint64)\":{\"details\":\"The surplus buffer ratio is the minimum collateral ratio required after surplus processing\",\"params\":{\"_surplusBufferRatio\":\"The new surplus buffer ratio in BASE_9\"}}},\"title\":\"SettersGovernor\",\"version\":1},\"userdoc\":{\"events\":{\"OracleTargetUpdated(address,uint256,uint256)\":{\"notice\":\"Emitted when a MAX target price is ratcheted up by `updateOracle`\"}},\"kind\":\"user\",\"methods\":{\"addCollateral(address)\":{\"notice\":\"Add `collateral` as a supported collateral in the system\"},\"adjustStablecoins(address,uint128,bool)\":{\"notice\":\"Adjusts the amount of stablecoins issued from `collateral` by `amount`\"},\"changeAllowance(address,address,uint256)\":{\"notice\":\"Sets the allowance of the contract on `token` for `spender` to `amount`\"},\"recoverERC20(address,address,address,uint256)\":{\"notice\":\"Recovers `amount` of `token` from the Parallelizer contract\"},\"revokeCollateral(address,bool)\":{\"notice\":\"Revokes `collateral` from the system\"},\"setAccessManager(address)\":{\"notice\":\"Sets a new access manager address\"},\"setCollateralManager(address,bool,(address[],bytes))\":{\"notice\":\"Sets (or unsets) a collateral manager `collateral`\"},\"setOracle(address,bytes)\":{\"notice\":\"Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations\"},\"setSwapRouter(address)\":{\"notice\":\"Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\"},\"setWhitelistStatus(address,uint8,bytes)\":{\"notice\":\"Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist\"},\"toggleTrusted(address,uint8)\":{\"notice\":\"Changes the trusted status for `sender` when for selling rewards or updating the normalizer\"},\"updateOracle(address)\":{\"notice\":\"Update oracle data for a given `collateral`\"},\"updatePayees(address[],uint256[],bool)\":{\"notice\":\"Updates the payees and their shares\"},\"updateSlippageTolerance(address,uint256)\":{\"notice\":\"Updates the slippage tolerance for a `collateral`\"},\"updateSurplusBufferRatio(uint64)\":{\"notice\":\"Updates the surplus buffer ratio\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/parallelizer/facets/SettersGovernor.sol\":\"SettersGovernor\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\"npm/@openzeppelin/contracts-upgradeable@5.4.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:@helpers/=project/libs/helpers/\",\"project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.4.0/\",\"project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.4.0/\",\"project/:contracts/=project/contracts/\"]},\"sources\":{\"npm/@openzeppelin/contracts@5.4.0/access/manager/AuthorityUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IAuthority} from \\\"./IAuthority.sol\\\";\\n\\nlibrary AuthorityUtils {\\n /**\\n * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\\n * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\\n * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\\n */\\n function canCallWithDelay(\\n address authority,\\n address caller,\\n address target,\\n bytes4 selector\\n ) internal view returns (bool immediate, uint32 delay) {\\n bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\\n\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x00)\\n mstore(0x20, 0x00)\\n\\n if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\\n immediate := mload(0x00)\\n delay := mload(0x20)\\n\\n // If delay does not fit in a uint32, return 0 (no delay)\\n // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\\n delay := mul(delay, iszero(shr(32, delay)))\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x05fd06ae5bca9dc7470fb2dfae764315c81a84f591e86be6fec0c115474edc6c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAccessManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManager.sol)\\n\\npragma solidity >=0.8.4;\\n\\ninterface IAccessManager {\\n /**\\n * @dev A delayed operation was scheduled.\\n */\\n event OperationScheduled(\\n bytes32 indexed operationId,\\n uint32 indexed nonce,\\n uint48 schedule,\\n address caller,\\n address target,\\n bytes data\\n );\\n\\n /**\\n * @dev A scheduled operation was executed.\\n */\\n event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev A scheduled operation was canceled.\\n */\\n event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\\n\\n /**\\n * @dev Informational labelling for a roleId.\\n */\\n event RoleLabel(uint64 indexed roleId, string label);\\n\\n /**\\n * @dev Emitted when `account` is granted `roleId`.\\n *\\n * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\\n * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\\n * otherwise it indicates the execution delay for this account and roleId is updated.\\n */\\n event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\\n\\n /**\\n * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\\n */\\n event RoleRevoked(uint64 indexed roleId, address indexed account);\\n\\n /**\\n * @dev Role acting as admin over a given `roleId` is updated.\\n */\\n event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\\n\\n /**\\n * @dev Role acting as guardian over a given `roleId` is updated.\\n */\\n event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\\n\\n /**\\n * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\\n */\\n event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\\n\\n /**\\n * @dev Target mode is updated (true = closed, false = open).\\n */\\n event TargetClosed(address indexed target, bool closed);\\n\\n /**\\n * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\\n */\\n event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\\n\\n /**\\n * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\\n */\\n event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\\n\\n error AccessManagerAlreadyScheduled(bytes32 operationId);\\n error AccessManagerNotScheduled(bytes32 operationId);\\n error AccessManagerNotReady(bytes32 operationId);\\n error AccessManagerExpired(bytes32 operationId);\\n error AccessManagerLockedRole(uint64 roleId);\\n error AccessManagerBadConfirmation();\\n error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\\n error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\\n error AccessManagerUnauthorizedConsume(address target);\\n error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\\n error AccessManagerInvalidInitialAdmin(address initialAdmin);\\n\\n /**\\n * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\\n * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\\n * & {execute} workflow.\\n *\\n * This function is usually called by the targeted contract to control immediate execution of restricted functions.\\n * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\\n * previously set delay (not zero), then the function should return false and the caller should schedule the operation\\n * for future execution.\\n *\\n * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\\n * the operation can be executed if and only if delay is greater than 0.\\n *\\n * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\\n * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\\n * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\\n *\\n * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\\n * {AccessManager} documentation.\\n */\\n function canCall(\\n address caller,\\n address target,\\n bytes4 selector\\n ) external view returns (bool allowed, uint32 delay);\\n\\n /**\\n * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\\n *\\n * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\\n * disabling any scheduling usage.\\n */\\n function expiration() external view returns (uint32);\\n\\n /**\\n * @dev Minimum setback for all delay updates, with the exception of execution delays. It\\n * can be increased without setback (and reset via {revokeRole} in the case event of an\\n * accidental increase). Defaults to 5 days.\\n */\\n function minSetback() external view returns (uint32);\\n\\n /**\\n * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\\n *\\n * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\\n */\\n function isTargetClosed(address target) external view returns (bool);\\n\\n /**\\n * @dev Get the role required to call a function.\\n */\\n function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\\n\\n /**\\n * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\\n */\\n function getTargetAdminDelay(address target) external view returns (uint32);\\n\\n /**\\n * @dev Get the id of the role that acts as an admin for the given role.\\n *\\n * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\\n * an operation that is restricted to this role.\\n */\\n function getRoleAdmin(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role that acts as a guardian for a given role.\\n *\\n * The guardian permission allows canceling operations that have been scheduled under the role.\\n */\\n function getRoleGuardian(uint64 roleId) external view returns (uint64);\\n\\n /**\\n * @dev Get the role current grant delay.\\n *\\n * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\\n * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\\n */\\n function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\\n\\n /**\\n * @dev Get the access details for a given account for a given role. These details include the timepoint at which\\n * membership becomes active, and the delay applied to all operation by this user that requires this permission\\n * level.\\n *\\n * Returns:\\n * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\\n * [1] Current execution delay for the account.\\n * [2] Pending execution delay for the account.\\n * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\\n */\\n function getAccess(\\n uint64 roleId,\\n address account\\n ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\\n\\n /**\\n * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\\n * permission might be associated with an execution delay. {getAccess} can provide more details.\\n */\\n function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\\n\\n /**\\n * @dev Give a label to a role, for improved role discoverability by UIs.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleLabel} event.\\n */\\n function labelRole(uint64 roleId, string calldata label) external;\\n\\n /**\\n * @dev Add `account` to `roleId`, or change its execution delay.\\n *\\n * This gives the account the authorization to call any function that is restricted to this role. An optional\\n * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\\n * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\\n * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\\n *\\n * If the account has already been granted this role, the execution delay will be updated. This update is not\\n * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\\n * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\\n * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - granted role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleGranted} event.\\n */\\n function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\\n\\n /**\\n * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\\n * no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be an admin for the role (see {getRoleAdmin})\\n * - revoked role must not be the `PUBLIC_ROLE`\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function revokeRole(uint64 roleId, address account) external;\\n\\n /**\\n * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\\n * the role this call has no effect.\\n *\\n * Requirements:\\n *\\n * - the caller must be `callerConfirmation`.\\n *\\n * Emits a {RoleRevoked} event if the account had the role.\\n */\\n function renounceRole(uint64 roleId, address callerConfirmation) external;\\n\\n /**\\n * @dev Change admin role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleAdminChanged} event\\n */\\n function setRoleAdmin(uint64 roleId, uint64 admin) external;\\n\\n /**\\n * @dev Change guardian role for a given role.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGuardianChanged} event\\n */\\n function setRoleGuardian(uint64 roleId, uint64 guardian) external;\\n\\n /**\\n * @dev Update the delay for granting a `roleId`.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {RoleGrantDelayChanged} event.\\n */\\n function setGrantDelay(uint64 roleId, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetFunctionRoleUpdated} event per selector.\\n */\\n function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\\n\\n /**\\n * @dev Set the delay for changing the configuration of a given target contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetAdminDelayUpdated} event.\\n */\\n function setTargetAdminDelay(address target, uint32 newDelay) external;\\n\\n /**\\n * @dev Set the closed flag for a contract.\\n *\\n * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n *\\n * Emits a {TargetClosed} event.\\n */\\n function setTargetClosed(address target, bool closed) external;\\n\\n /**\\n * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\\n * operation is not yet scheduled, has expired, was executed, or was canceled.\\n */\\n function getSchedule(bytes32 id) external view returns (uint48);\\n\\n /**\\n * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\\n * been scheduled.\\n */\\n function getNonce(bytes32 id) external view returns (uint32);\\n\\n /**\\n * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\\n * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\\n * required for the caller. The special value zero will automatically set the earliest possible time.\\n *\\n * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\\n * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\\n * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\\n *\\n * Emits a {OperationScheduled} event.\\n *\\n * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\\n * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\\n * contract if it is using standard Solidity ABI encoding.\\n */\\n function schedule(\\n address target,\\n bytes calldata data,\\n uint48 when\\n ) external returns (bytes32 operationId, uint32 nonce);\\n\\n /**\\n * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\\n * execution delay is 0.\\n *\\n * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\\n * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\\n *\\n * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\\n */\\n function execute(address target, bytes calldata data) external payable returns (uint32);\\n\\n /**\\n * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\\n * operation that is cancelled.\\n *\\n * Requirements:\\n *\\n * - the caller must be the proposer, a guardian of the targeted function, or a global admin\\n *\\n * Emits a {OperationCanceled} event.\\n */\\n function cancel(address caller, address target, bytes calldata data) external returns (uint32);\\n\\n /**\\n * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\\n * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\\n *\\n * This is useful for contract that want to enforce that calls targeting them were scheduled on the manager,\\n * with all the verifications that it implies.\\n *\\n * Emit a {OperationExecuted} event.\\n */\\n function consumeScheduledOp(address caller, bytes calldata data) external;\\n\\n /**\\n * @dev Hashing function for delayed operations.\\n */\\n function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\\n\\n /**\\n * @dev Changes the authority of a target managed by this manager instance.\\n *\\n * Requirements:\\n *\\n * - the caller must be a global admin\\n */\\n function updateAuthority(address target, address newAuthority) external;\\n}\\n\",\"keccak256\":\"0x640fe2b6e5201c47322d458f81078d6dcf23ccf9954f8995b1b7bfbec0eb1421\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/access/manager/IAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Standard interface for permissioning originally defined in Dappsys.\\n */\\ninterface IAuthority {\\n /**\\n * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\\n */\\n function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\\n}\\n\",\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC1363.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC165} from \\\"./IERC165.sol\\\";\\n\\n/**\\n * @title IERC1363\\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\\n *\\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\\n */\\ninterface IERC1363 is IERC20, IERC165 {\\n /*\\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\\n * 0xb0202a11 ===\\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\\n */\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\\n * @param from The address which you want to send tokens from.\\n * @param to The address which you want to transfer to.\\n * @param value The amount of tokens to be transferred.\\n * @param data Additional data with no specified format, sent in call to `to`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\\n * @param spender The address which will spend the funds.\\n * @param value The amount of tokens to be spent.\\n * @param data Additional data with no specified format, sent in call to `spender`.\\n * @return A boolean value indicating whether the operation succeeded unless throwing.\\n */\\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\",\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC-20 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\":\"0xd6fa4088198f04eef10c5bce8a2f4d60554b7ec4b987f684393c01bf79b94d9f\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC1363} from \\\"../../../interfaces/IERC1363.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC-20 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 /**\\n * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\\n */\\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\\n return _callOptionalReturnBool(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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \\\"client\\\"\\n * smart contract uses ERC-7674 to set temporary allowances, then the \\\"client\\\" smart contract should avoid using\\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\\n * only sets the \\\"standard\\\" allowance. Any temporary allowance will remain active, in addition to the value being\\n * set here.\\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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n safeTransfer(token, to, value);\\n } else if (!token.transferAndCall(to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function transferFromAndCallRelaxed(\\n IERC1363 token,\\n address from,\\n address to,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n if (to.code.length == 0) {\\n safeTransferFrom(token, from, to, value);\\n } else if (!token.transferFromAndCall(from, to, value, data)) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\\n * targeting contracts.\\n *\\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\\n * once without retrying, and relies on the returned value to be true.\\n *\\n * Reverts if the returned value is other than `true`.\\n */\\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\\n if (to.code.length == 0) {\\n forceApprove(token, to, value);\\n } else if (!token.approveAndCall(to, value, data)) {\\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n // bubble errors\\n if iszero(success) {\\n let ptr := mload(0x40)\\n returndatacopy(ptr, 0, returndatasize())\\n revert(ptr, returndatasize())\\n }\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n\\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\\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 silently catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly (\\\"memory-safe\\\") {\\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0)\\n }\\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\\n }\\n}\\n\",\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\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[ERC 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\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 Return the 512-bit addition of two uint256.\\n *\\n * The result is stored in two 256 variables such that sum = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n assembly (\\\"memory-safe\\\") {\\n low := add(a, b)\\n high := lt(low, a)\\n }\\n }\\n\\n /**\\n * @dev Return the 512-bit multiplication of two uint256.\\n *\\n * The result is stored in two 256 variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n */\\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\\n // 512-bit multiply [high low] = x * y. Compute the product mod 2\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = high * 2\\u00b2\\u2075\\u2076 + low.\\n assembly (\\\"memory-safe\\\") {\\n let mm := mulmod(a, b, not(0))\\n low := mul(a, b)\\n high := sub(sub(mm, low), lt(mm, low))\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a + b;\\n success = c >= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a - b;\\n success = c <= a;\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n uint256 c = a * b;\\n assembly (\\\"memory-safe\\\") {\\n // Only true when the multiplication doesn't overflow\\n // (c / a == b) || (a == 0)\\n success := or(eq(div(c, a), b), iszero(a))\\n }\\n // equivalent to: success ? c : 0\\n result = c * SafeCast.toUint(success);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `DIV` opcode returns zero when the denominator is 0.\\n result := div(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n success = b > 0;\\n assembly (\\\"memory-safe\\\") {\\n // The `MOD` opcode returns zero when the denominator is 0.\\n result := mod(a, b)\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsigned saturating addition, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryAdd(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\\n */\\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\\n (, uint256 result) = trySub(a, b);\\n return result;\\n }\\n\\n /**\\n * @dev Unsigned saturating multiplication, bounds to `2\\u00b2\\u2075\\u2076 - 1` instead of overflowing.\\n */\\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n (bool success, uint256 result) = tryMul(a, b);\\n return ternary(success, result, type(uint256).max);\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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 (uint256 high, uint256 low) = mul512(x, y);\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (high == 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 low / denominator;\\n }\\n\\n // Make sure the result is less than 2\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= high) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [high low].\\n uint256 remainder;\\n assembly (\\\"memory-safe\\\") {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n high := sub(high, gt(remainder, low))\\n low := sub(low, 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 (\\\"memory-safe\\\") {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [high low] by twos.\\n low := div(low, twos)\\n\\n // Flip twos such that it is 2\\u00b2\\u2075\\u2076 / 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 high into low.\\n low |= high * twos;\\n\\n // Invert denominator mod 2\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, this is the final result. We don't need to compute the high bits of the result and high\\n // is no longer required.\\n result = low * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\\n unchecked {\\n (uint256 high, uint256 low) = mul512(x, y);\\n if (high >= 1 << n) {\\n Panic.panic(Panic.UNDER_OVERFLOW);\\n }\\n return (high << (256 - n)) | (low >> n);\\n }\\n }\\n\\n /**\\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\\n */\\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // If upper 8 bits of 16-bit half set, add 8 to result\\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\\n // If upper 4 bits of 8-bit half set, add 4 to result\\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\\n\\n // Shifts value right by the current result and use it as an index into this lookup table:\\n //\\n // | x (4 bits) | index | table[index] = MSB position |\\n // |------------|---------|-----------------------------|\\n // | 0000 | 0 | table[0] = 0 |\\n // | 0001 | 1 | table[1] = 0 |\\n // | 0010 | 2 | table[2] = 1 |\\n // | 0011 | 3 | table[3] = 1 |\\n // | 0100 | 4 | table[4] = 2 |\\n // | 0101 | 5 | table[5] = 2 |\\n // | 0110 | 6 | table[6] = 2 |\\n // | 0111 | 7 | table[7] = 2 |\\n // | 1000 | 8 | table[8] = 3 |\\n // | 1001 | 9 | table[9] = 3 |\\n // | 1010 | 10 | table[10] = 3 |\\n // | 1011 | 11 | table[11] = 3 |\\n // | 1100 | 12 | table[12] = 3 |\\n // | 1101 | 13 | table[13] = 3 |\\n // | 1110 | 14 | table[14] = 3 |\\n // | 1111 | 15 | table[15] = 3 |\\n //\\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\\n assembly (\\\"memory-safe\\\") {\\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\\n }\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 x) internal pure returns (uint256 r) {\\n // If value has upper 128 bits set, log2 result is at least 128\\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\\n // If upper 64 bits of 128-bit half set, add 64 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\\n // If upper 32 bits of 64-bit half set, add 32 to result\\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\\n // If upper 16 bits of 32-bit half set, add 16 to result\\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\"},\"npm/@openzeppelin/contracts@5.4.0/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.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/bool 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 /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"project/contracts/interfaces/IManager.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `IManager` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IManager.sol\\ninterface IManager {\\n /// @notice Returns the amount of collateral managed by the Manager\\n /// @return balances Balances of all the subCollaterals handled by the manager\\n /// @dev MUST NOT revert\\n function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);\\n\\n /// @notice Hook to invest `amount` of `collateral`\\n /// @dev MUST revert if the manager cannot accept these funds\\n /// @dev MUST have received the funds beforehand\\n function invest(uint256 amount) external;\\n\\n /// @notice Sends `amount` of `collateral` to the `to` address\\n /// @dev Called when `tokenP` are burnt and during redemptions\\n // @dev MUST revert if there are not funds enough available\\n /// @dev MUST be callable only by the parallelizer\\n function release(address asset, address to, uint256 amount) external;\\n\\n /// @notice Gives the maximum amount of collateral immediately available for a transfer\\n /// @dev Useful for integrators using `quoteIn` and `quoteOut`\\n function maxAvailable() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8507172834f0243643fcf366bff6bae8f20523d102f5896f2140946975458e2c\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/IParallelizerOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\n/// @title IParallelizerOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ITransmuterOracle` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ITransmuterOracle.sol\\ninterface IParallelizerOracle {\\n /// @notice Reads the oracle value for asset to use in a redemption to compute the collateral ratio\\n function readRedemption() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a mint. It should be comprehensive of the\\n /// deviation from the target price\\n function readMint() external view returns (uint256);\\n\\n /// @notice Reads the oracle value for asset to use in a burn transaction as well as the ratio\\n /// between the current price and the target price for the asset\\n function readBurn() external view returns (uint256 oracleValue, uint256 ratio);\\n\\n /// @notice Reads the oracle value for asset\\n function read() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1efe82def8da7cdbf7378004558354bfc63610f40760e56340f6b4c5bb1273e6\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ISetters.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\nimport \\\"../parallelizer/Storage.sol\\\";\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This interface is an authorized fork of Angle's `ISettersGovernor` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/ISetters.sol\\ninterface ISettersGovernor {\\n /// @notice Recovers `amount` of `token` from the Parallelizer contract\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external;\\n\\n /// @notice Sets a new access manager address\\n function setAccessManager(address _newAccessManager) external;\\n\\n /// @notice Sets (or unsets) a collateral manager `collateral`\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before setting the new manager\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external;\\n\\n /// @notice Sets the allowance of the contract on `token` for `spender` to `amount`\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external;\\n\\n /// @notice Changes the trusted status for `sender` when for selling rewards or updating the normalizer\\n function toggleTrusted(address sender, TrustedType t) external;\\n\\n /// @notice Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted\\n /// addresses\\n /// and sets the data used to read into the whitelist\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) external;\\n\\n /// @notice Add `collateral` as a supported collateral in the system\\n function addCollateral(address collateral) external;\\n\\n /// @notice Adjusts the amount of stablecoins issued from `collateral` by `amount`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external;\\n\\n /// @notice Revokes `collateral` from the system\\n /// @dev If `checkExternalManagerBalance` is true, the function will check that the current manager no longer has\\n /// assets before revoking the collateral\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external;\\n\\n /// @notice Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption\\n /// operations\\n function setOracle(address collateral, bytes memory oracleConfig) external;\\n\\n /// @notice Update oracle data for a given `collateral`\\n function updateOracle(address collateral) external;\\n\\n /// @notice Updates the payees and their shares\\n /// @param _payees The new payee addresses\\n /// @param _shares The new shares for each payee\\n /// @param _skipRelease If true, skips the automatic income release before updating\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external;\\n\\n /// @notice Updates the slippage tolerance for a `collateral`\\n /// @dev Maximum slippage tolerance is 1e9 (100%)\\n /// @dev The slippage tolerance is used to compute the minimum expected amount of stablecoins to be received when\\n /// calling the `processSurplus` function\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external;\\n\\n /// @notice Updates the surplus buffer ratio\\n /// @dev The surplus buffer ratio is the minimum collateral ratio required after surplus processing\\n /// @param _surplusBufferRatio The new surplus buffer ratio in BASE_9\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external;\\n\\n /// @notice Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to\\n /// @dev The payload is executed with a raw call, so any router can be configured. It is chain\\n /// specific and must be set on every deployment before rewards can be sold\\n function setSwapRouter(address swapRouter) external;\\n}\\n\\n/// @title ISettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\ninterface ISettersGuardian {\\n /// @notice Pauses `action` for `collateral` (or pauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is already paused.\\n function pause(address collateral, ActionType action) external;\\n\\n /// @notice Unpauses `action` for `collateral` (or unpauses redemption protocol-wide when\\n /// `action == Redeem`). Reverts if the action is not paused.\\n function unpause(address collateral, ActionType action) external;\\n\\n /// @notice Sets the mint or burn fees for `collateral`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) external;\\n\\n /// @notice Sets the parameters for the redemption curve\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) external;\\n\\n /// @notice Changes the whitelist status for a collateral with `whitelistType` for an address `who`\\n function toggleWhitelist(WhitelistType whitelistType, address who) external;\\n\\n /// @notice Sets the stablecoin cap that can be issued from a `collateral`\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) external;\\n}\\n\",\"keccak256\":\"0xe62d2880420afb053498b01f1def17d4c8e2c6c9b48cc5a71d013150a5ca8db4\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/ITokenP.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title ITokenP\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Interface for the stablecoins `tokenP` contracts\\n/// @dev This interface is an authorized fork of Angle's `IAgToken` interface\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/interfaces/IAgToken.sol\\ninterface ITokenP is IERC20 {\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MINTER ROLE ONLY FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Lets a whitelisted contract mint tokenPs\\n /// @param account Address to mint to\\n /// @param amount Amount to mint\\n function mint(address account, uint256 amount) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @param sender Address which requested the burn from `burner`\\n /// @dev This method is to be called by a contract with the minter right after being requested\\n /// to do so by a `sender` address willing to burn tokens from another `burner` address\\n /// @dev The method checks the allowance between the `sender` and the `burner`\\n function burnFrom(uint256 amount, address burner, address sender) external;\\n\\n /// @notice Burns `amount` tokens from a `burner` address\\n /// @param amount Amount of tokens to burn\\n /// @param burner Address to burn from\\n /// @dev This method is to be called by a contract with a minter right on the tokenP after being\\n /// requested to do so by an address willing to burn tokens from its address\\n function burnSelf(uint256 amount, address burner) external;\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n EXTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Amount of decimals of the stablecoin\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x64a1305faa8c5c91767a11af0eae16e4b463aa0bfe10f11b74aae9d96681a5eb\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n\\n function latestRoundData()\\n external\\n view\\n returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\\n}\\n\",\"keccak256\":\"0x94da577160ebb1bfeb7008676c8e7d43dda926d9c0beee29077e9ed774707373\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/coinbase/ICbETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ICbETH\\n/// @notice Interface for the `cbETH` contract\\ninterface ICbETH {\\n function exchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb159341cb0e25c478912b274cdda2d50fa84692aeac87b6823d281aaea2aed04\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/frax/ISfrxETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title ISfrxETH\\n/// @notice Interface for the `sfrxETH` contract\\ninterface ISfrxETH {\\n function pricePerShare() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x914cbea276f817c7db62bfca21e15bd8f7892faa9f39d86baaef574cf12b859f\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/keyring/IKeyringGuard.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IKeyringGuard\\n/// @notice Interface for the `KeyringGuard` contract\\ninterface IKeyringGuard {\\n function isAuthorized(address from, address to) external returns (bool passed);\\n}\\n\",\"keccak256\":\"0x30bdab602ba0a6e2571372803ae35f7bebcc354d69408be627c04c57f7071f90\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/lido/IStETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IStETH\\n/// @notice Interface for the `StETH` contract\\ninterface IStETH {\\n function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);\\n\\n function submit(address) external payable returns (uint256);\\n\\n function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf21e3d8bdadc236b34bf2122b0e0b939d2d6bb6e2889b508636cbb7b84f59680\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/morpho/IMorphoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IMorphoOracle\\n/// @notice Interface for the oracle contracts used within Morpho\\ninterface IMorphoOracle {\\n function price() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x0d1849803b554763f1dce55eba5a6e8d7c5b12d4cc8dfe23637e827d2ee91d17\",\"license\":\"GPL-3.0\"},\"project/contracts/interfaces/external/rocketPool/IRETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\n/// @title IRETH\\n/// @notice Interface for the `rETH` contract\\ninterface IRETH {\\n function getExchangeRate() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x567a378e95d40160e297c1adb617ccaa69c03e49c4ad72a6ce651dd43cdbd5cd\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/Storage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { ITokenP } from \\\"contracts/interfaces/ITokenP.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ENUMS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nenum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n}\\n\\nenum ManagerType {\\n EXTERNAL\\n}\\n\\nenum ActionType {\\n Mint,\\n Burn,\\n Redeem\\n}\\n\\nenum TrustedType {\\n Updater,\\n Seller\\n}\\n\\nenum QuoteType {\\n MintExactInput,\\n MintExactOutput,\\n BurnExactInput,\\n BurnExactOutput\\n}\\n\\nenum OracleReadType {\\n CHAINLINK_FEEDS,\\n EXTERNAL,\\n NO_ORACLE,\\n STABLE,\\n WSTETH,\\n CBETH,\\n RETH,\\n SFRXETH,\\n MAX,\\n MORPHO_ORACLE\\n}\\n\\nenum OracleQuoteType {\\n UNIT,\\n TARGET\\n}\\n\\nenum WhitelistType {\\n BACKED\\n}\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STRUCTS \\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nstruct Permit2Details {\\n address to; // Address that will receive the funds\\n uint256 nonce; // Nonce of the transaction\\n bytes signature; // Permit signature of the user\\n}\\n\\nstruct AuthorizationParams {\\n address from; // Payer's address (Authorizer)\\n uint256 value; // Amount authorized to be transferred\\n uint256 validAfter; // The time after which this is valid (unix time)\\n uint256 validBefore; // The time before which this is valid (unix time)\\n bytes32 nonce; // Unique nonce\\n bytes signature; // EOA (r,s,v packed) or arbitrary-length EIP-1271 contract signature\\n}\\n\\nstruct FacetCut {\\n address facetAddress; // Facet contract address\\n FacetCutAction action; // Can be add, remove or replace\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct Facet {\\n address facetAddress; // Facet contract address\\n bytes4[] functionSelectors; // Ex. bytes4(keccak256(\\\"transfer(address,uint256)\\\"))\\n}\\n\\nstruct FacetInfo {\\n address facetAddress; // Facet contract address\\n uint16 selectorPosition; // Position in the list of all selectors\\n}\\n\\nstruct DiamondStorage {\\n bytes4[] selectors; // List of all available selectors\\n mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)\\n IAccessManager accessManager; // Contract handling access management\\n}\\n\\nstruct ImplementationStorage {\\n address implementation; // Dummy implementation address for Etherscan usability\\n}\\n\\nstruct ManagerStorage {\\n IERC20[] subCollaterals; // Subtokens handled by the manager or strategies\\n bytes config; // Additional configuration data\\n}\\n\\nstruct Collateral {\\n uint8 isManaged; // If the collateral is managed through external strategies\\n uint8 isMintLive; // If minting from this asset is unpaused\\n uint8 isBurnLive; // If burning to this asset is unpaused\\n uint8 decimals; // IERC20Metadata(collateral).decimals()\\n uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token\\n uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral\\n uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[\\n int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`\\n uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]\\n int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`\\n bytes oracleConfig; // Data about the oracle used for the collateral\\n bytes whitelistData; // For whitelisted collateral, data used to verify whitelists\\n ManagerStorage managerData; // For managed collateral, data used to handle the strategies\\n uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral\\n}\\n\\nstruct ParallelizerStorage {\\n ITokenP tokenP; // tokenP handled by the system\\n uint8 isRedemptionLive; // If redemption is unpaused\\n uint8 statusReentrant; // If call is reentrant or not\\n bool consumingSchedule; // If the contract is consuming a scheduled operation\\n uint128 normalizedStables; // Normalized amount of stablecoins issued by the system\\n uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount\\n address[] collateralList; // List of collateral assets supported by the system\\n uint64[] xRedemptionCurve; // Increasing collateral ratios > 0\\n int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`\\n mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters\\n mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value\\n mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run\\n // keeper jobs on oracles\\n mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType; // Whether an address is whitelisted for\\n // a specific whitelist type\\n // Used for the surplus distribution\\n mapping(address => uint256) slippageTolerance;\\n uint64 surplusBufferRatio; // Minimum collateral ratio required after surplus processing\\n uint256 lastReleasedAt;\\n uint256 totalShares; // The total shares of the totalShares for all payees\\n address[] payees; // The addresses of the payees\\n mapping(address => uint256) shares; // The shares of the totalShares for each payee\\n // Aggregator or DEX the `RewardHandler` forwards its swap payload to\\n address swapRouter;\\n}\\n\",\"keccak256\":\"0x310e015008150bcaf10246fa5b1ec4ce4c5e2ba2ec9ef30dcbbfb4eb407d70c3\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/AccessManagedModifiers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { LibDiamond } from \\\"../libraries/LibDiamond.sol\\\";\\nimport { LibStorage as s, ParallelizerStorage } from \\\"../libraries/LibStorage.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\n\\n/// @title AccessManagedModifiers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `AccessControlModifiers` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/AccessControlModifiers.sol\\n/// update access logic to use OpenZeppelin's `AccessManaged` logic\\ncontract AccessManagedModifiers {\\n /// @notice Checks whether the `msg.sender` can call a function with a given selector\\n modifier restricted() {\\n if (!LibDiamond.checkCanCall(msg.sender, msg.data)) revert AccessManagedUnauthorized(msg.sender);\\n _;\\n }\\n\\n /// @notice Prevents a contract from calling itself, directly or indirectly\\n /// @dev This implementation is an adaptation of the OpenZepellin `ReentrancyGuard` for the purpose of this\\n /// Diamond Proxy system. The base implementation can be found here\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol\\n modifier nonReentrant() {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n // Reentrant protection\\n // On the first call, `ts.statusReentrant` will be `NOT_ENTERED`\\n if (ts.statusReentrant == ENTERED) revert ReentrantCall();\\n // Any calls to the `nonReentrant` modifier after this point will fail\\n ts.statusReentrant = ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n ts.statusReentrant = NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa44d232cccfb0c1752bc298d6f6743fff60b4a9e947725f1ec476f04f11003e1\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/facets/SettersGovernor.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { ISettersGovernor } from \\\"contracts/interfaces/ISetters.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibSetters } from \\\"../libraries/LibSetters.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\nimport { AccessManagedModifiers } from \\\"./AccessManagedModifiers.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title SettersGovernor\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This contract is an authorized fork of Angle's `SettersGovernor` contract\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/facets/SettersGovernor.sol\\ncontract SettersGovernor is AccessManagedModifiers, ISettersGovernor {\\n using SafeERC20 for IERC20;\\n\\n event Recovered(address indexed token, address indexed to, uint256 amount);\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev No check is made on the collateral that is redeemed: this function could typically be used by a\\n /// governance during a manual rebalance of the reserves of the system\\n /// @dev `collateral` is different from `token` only in the case of a managed collateral\\n function recoverERC20(address collateral, IERC20 token, address to, uint256 amount) external restricted {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) LibManager.release(address(token), to, amount, collatInfo.managerData.config);\\n else token.safeTransfer(to, amount);\\n emit Recovered(address(token), to, amount);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setAccessManager(address _newAccessManager) external restricted {\\n LibSetters.setAccessManager(IAccessManager(_newAccessManager));\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Funds need to have been withdrawn from the eventual previous manager prior to this call\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n external\\n restricted\\n {\\n LibSetters.setCollateralManager(collateral, checkExternalManagerBalance, managerData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev This function can typically be used to grant allowance to a newly added manager for it to pull the\\n /// funds associated to the collateral it corresponds to\\n function changeAllowance(IERC20 token, address spender, uint256 amount) external restricted {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < amount) {\\n token.safeIncreaseAllowance(spender, amount - currentAllowance);\\n } else if (currentAllowance > amount) {\\n token.safeDecreaseAllowance(spender, currentAllowance - amount);\\n }\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function toggleTrusted(address sender, TrustedType t) external restricted {\\n LibSetters.toggleTrusted(sender, t);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Collateral assets with a fee on transfer are not supported by the system\\n function addCollateral(address collateral) external restricted {\\n LibSetters.addCollateral(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev The amount passed here must be an absolute amount\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) external restricted {\\n LibSetters.adjustStablecoins(collateral, amount, increase);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n /// @dev Require `collatInfo.normalizedStables == 0`, that is to say that the collateral\\n /// is not used to back stables\\n /// @dev The system may still have a non null balance of the collateral that is revoked: this should later\\n /// be handled through a recoverERC20 call\\n /// @dev Funds needs to have been withdrew from the manager prior to this call if `checkExternalManagerBalance` is\\n /// true\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) external restricted {\\n LibSetters.revokeCollateral(collateral, checkExternalManagerBalance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setOracle(address collateral, bytes memory oracleConfig) external restricted {\\n LibSetters.setOracle(collateral, oracleConfig);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateOracle(address collateral) external {\\n if (s.transmuterStorage().isSellerTrusted[msg.sender] == 0) revert NotTrusted();\\n LibOracle.updateOracle(collateral);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setWhitelistStatus(\\n address collateral,\\n uint8 whitelistStatus,\\n bytes memory whitelistData\\n )\\n external\\n restricted\\n {\\n LibSetters.setWhitelistStatus(collateral, whitelistStatus, whitelistData);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) external restricted {\\n LibSetters.updatePayees(_payees, _shares, _skipRelease);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) external restricted {\\n LibSetters.updateSlippageTolerance(collateral, slippageTolerance);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) external restricted {\\n LibSetters.updateSurplusBufferRatio(_surplusBufferRatio);\\n }\\n\\n /// @inheritdoc ISettersGovernor\\n function setSwapRouter(address swapRouter) external restricted {\\n LibSetters.setSwapRouter(swapRouter);\\n }\\n}\\n\",\"keccak256\":\"0x7c64a27bfb326989b6fdc21b3982ef5ce95aa2a576a4edc6d8334a8820f3b8fb\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { IAccessManager } from \\\"@openzeppelin/contracts/access/manager/IAccessManager.sol\\\";\\nimport { AuthorityUtils } from \\\"@openzeppelin/contracts/access/manager/AuthorityUtils.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibDiamond\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @notice Helper library to deal with diamond proxies.\\n/// @dev Reference: EIP-2535 Diamonds\\n/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen\\nlibrary LibDiamond {\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n INTERNAL FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n function isGovernor(address caller) internal view returns (bool) {\\n (bool isMember,) = s.diamondStorage().accessManager.hasRole(GOVERNOR_ROLE, caller);\\n return isMember;\\n }\\n\\n /// @notice Checks whether `caller` can call `data` on `this`\\n function checkCanCall(address caller, bytes calldata data) internal returns (bool) {\\n IAccessManager accessManager = s.diamondStorage().accessManager;\\n (bool immediate, uint32 delay) =\\n AuthorityUtils.canCallWithDelay(address(accessManager), caller, address(this), bytes4(data[0:4]));\\n if (!immediate) {\\n if (delay > 0) {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.consumingSchedule = true;\\n accessManager.consumeScheduledOp(caller, data);\\n ts.consumingSchedule = false;\\n } else {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Internal function version of `diamondCut`\\n function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {\\n uint256 diamondCutLength = _diamondCut.length;\\n for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {\\n bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;\\n address facetAddress = _diamondCut[facetIndex].facetAddress;\\n\\n if (functionSelectors.length == 0) {\\n revert NoSelectorsProvidedForFacetForCut(facetAddress);\\n }\\n\\n FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == FacetCutAction.Add) {\\n _addFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Replace) {\\n _replaceFunctions(facetAddress, functionSelectors);\\n } else if (action == FacetCutAction.Remove) {\\n _removeFunctions(facetAddress, functionSelectors);\\n }\\n }\\n\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n _initializeDiamondCut(_init, _calldata);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n PRIVATE FUNCTIONS \\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Does a delegate call on `_init` with `_calldata`\\n function _initializeDiamondCut(address _init, bytes memory _calldata) private {\\n if (_init == address(0)) {\\n return;\\n }\\n _enforceHasContractCode(_init);\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n assembly (\\\"memory-safe\\\") {\\n let returndata_size := mload(error)\\n revert(add(32, error), returndata_size)\\n }\\n } else {\\n revert InitializationFunctionReverted(_init, _calldata);\\n }\\n }\\n }\\n\\n /// @notice Adds a new function to the diamond proxy\\n /// @dev Reverts if selectors are already existing\\n function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n if (_facetAddress == address(0)) {\\n revert CannotAddSelectorsToZeroAddress(_functionSelectors);\\n }\\n DiamondStorage storage ds = s.diamondStorage();\\n uint16 selectorCount = uint16(ds.selectors.length);\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n if (oldFacetAddress != address(0)) {\\n revert CannotAddFunctionToDiamondThatAlreadyExists(selector);\\n }\\n ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);\\n ds.selectors.push(selector);\\n selectorCount++;\\n }\\n }\\n\\n /// @notice Upgrades a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n if (_facetAddress == address(0)) {\\n revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);\\n }\\n _enforceHasContractCode(_facetAddress);\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorInfo[selector].facetAddress;\\n // Can't replace immutable functions -- functions defined directly in the diamond in this case\\n if (oldFacetAddress == address(this)) {\\n revert CannotReplaceImmutableFunction(selector);\\n }\\n if (oldFacetAddress == _facetAddress) {\\n revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);\\n }\\n if (oldFacetAddress == address(0)) {\\n revert CannotReplaceFunctionThatDoesNotExists(selector);\\n }\\n // Replace old facet address\\n ds.selectorInfo[selector].facetAddress = _facetAddress;\\n }\\n }\\n\\n /// @notice Removes a function in the diamond proxy\\n /// @dev Reverts if selectors do not already exist\\n function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {\\n DiamondStorage storage ds = s.diamondStorage();\\n uint256 selectorCount = ds.selectors.length;\\n if (_facetAddress != address(0)) {\\n revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);\\n }\\n uint256 functionSelectorsLength = _functionSelectors.length;\\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {\\n revert CannotRemoveFunctionThatDoesNotExist(selector);\\n }\\n\\n // Can't remove immutable functions -- functions defined directly in the diamond\\n if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {\\n revert CannotRemoveImmutableFunction(selector);\\n }\\n // Replace selector with last selector\\n selectorCount--;\\n if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {\\n bytes4 lastSelector = ds.selectors[selectorCount];\\n ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;\\n ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;\\n }\\n // Delete last selector\\n ds.selectors.pop();\\n delete ds.selectorInfo[selector];\\n }\\n }\\n\\n /// @notice Checks that an address has a non void bytecode\\n function _enforceHasContractCode(address _contract) private view {\\n uint256 contractSize;\\n assembly (\\\"memory-safe\\\") {\\n contractSize := extcodesize(_contract)\\n }\\n if (contractSize == 0) {\\n revert ContractHasNoCode();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x10bde4c13cc3d3c4aec15b793565bfe05b5f770eafeb839bfd159dbe6351dc62\",\"license\":\"MIT\"},\"project/contracts/parallelizer/libraries/LibGetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { LibHelpers } from \\\"./LibHelpers.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibGetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibGetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibGetters.sol\\nlibrary LibGetters {\\n using Math for uint256;\\n using SafeCast for uint256;\\n\\n /// @notice Internal version of the `getCollateralRatio` function with additional return values like `tokens` that\\n /// is the list of tokens supported by the system, or `balances` which is the amount of each token in `tokens`\\n /// controlled by the protocol\\n /// @dev In case some collaterals support external strategies (`isManaged>0`), this list may be bigger\\n /// than the `collateralList`\\n /// @dev `subCollateralsTracker` is an array which gives for each collateral asset in the collateral list an\\n /// accumulator helping to recompute the amount of sub-collateral for each collateral. If the array is:\\n /// [1,4,5], this means that the collateral with index 1 in the `collateralsList` has 4-1=3 sub-collaterals.\\n function getCollateralRatio()\\n internal\\n view\\n returns (\\n uint64 collatRatio,\\n uint256 stablecoinsIssued,\\n address[] memory tokens,\\n uint256[] memory balances,\\n uint256[] memory subCollateralsTracker\\n )\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 totalCollateralization;\\n address[] memory collateralList = ts.collateralList;\\n uint256 collateralListLength = collateralList.length;\\n uint256 subCollateralsAmount;\\n // Building the `subCollateralsTracker` array which is useful when later sending the tokens as part of the\\n // redemption\\n subCollateralsTracker = new uint256[](collateralListLength);\\n for (uint256 i; i < collateralListLength; ++i) {\\n if (ts.collaterals[collateralList[i]].isManaged == 0) ++subCollateralsAmount;\\n else subCollateralsAmount += ts.collaterals[collateralList[i]].managerData.subCollaterals.length;\\n subCollateralsTracker[i] = subCollateralsAmount;\\n }\\n balances = new uint256[](subCollateralsAmount);\\n tokens = new address[](subCollateralsAmount);\\n\\n {\\n uint256 countCollat;\\n for (uint256 i; i < collateralListLength; ++i) {\\n Collateral storage collateral = ts.collaterals[collateralList[i]];\\n uint256 collateralBalance; // Will be either the balance or the value of assets managed\\n if (collateral.isManaged > 0) {\\n // If a collateral is managed, the balances of the sub-collaterals cannot be directly obtained by\\n // calling `balanceOf` of the sub-collaterals\\n uint256[] memory subCollateralsBalances;\\n (subCollateralsBalances, collateralBalance) = LibManager.totalAssets(collateral.managerData.config);\\n uint256 numSubCollats = subCollateralsBalances.length;\\n for (uint256 k; k < numSubCollats; ++k) {\\n tokens[countCollat + k] = address(collateral.managerData.subCollaterals[k]);\\n balances[countCollat + k] = subCollateralsBalances[k];\\n }\\n countCollat += numSubCollats;\\n } else {\\n collateralBalance = IERC20(collateralList[i]).balanceOf(address(this));\\n tokens[countCollat] = collateralList[i];\\n balances[countCollat++] = collateralBalance;\\n }\\n uint256 oracleValue = LibOracle.readRedemption(collateral.oracleConfig);\\n totalCollateralization += (oracleValue\\n * LibHelpers.convertDecimalTo(collateralBalance, collateral.decimals, 18, Math.Rounding.Floor)) / BASE_18;\\n }\\n }\\n // The `stablecoinsIssued` value need to be rounded up because it is then used as a divizer when computing\\n // the `collatRatio`\\n stablecoinsIssued = uint256(ts.normalizedStables).mulDiv(ts.normalizer, BASE_27, Math.Rounding.Ceil);\\n if (stablecoinsIssued > 0) {\\n collatRatio = (totalCollateralization.mulDiv(BASE_9, stablecoinsIssued, Math.Rounding.Ceil)).toUint64();\\n } else {\\n collatRatio = type(uint64).max;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x41690742d2eccc9bcdd914e706c3e0ad203f72284d88bf7bfbaae7c89db23a6d\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.28;\\n\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibHelpers\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibHelpers` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibHelpers.sol\\nlibrary LibHelpers {\\n /// @notice Rebases the units of `amount` from `fromDecimals` to `toDecimals`\\n function convertDecimalTo(\\n uint256 amount,\\n uint8 fromDecimals,\\n uint8 toDecimals,\\n Math.Rounding rounding\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (fromDecimals > toDecimals) {\\n uint256 divisor = 10 ** (fromDecimals - toDecimals);\\n return Math.mulDiv(amount, 1, divisor, rounding);\\n } else if (fromDecimals < toDecimals) {\\n return amount * 10 ** (toDecimals - fromDecimals);\\n } else {\\n return amount;\\n }\\n }\\n\\n /// @notice Checks whether a `token` is in a list `tokens` and returns the index of the token in the list\\n /// or -1 in the other case\\n function checkList(address token, address[] memory tokens) internal pure returns (int256) {\\n uint256 tokensLength = tokens.length;\\n for (uint256 i; i < tokensLength; ++i) {\\n if (token == tokens[i]) return int256(i);\\n }\\n return -1;\\n }\\n\\n /// @notice Searches a sorted `array` and returns the first index that contains a value strictly greater\\n /// (or lower if increasingArray is false) to `element` minus 1\\n /// @dev If no such index exists (i.e. all values in the array are strictly lesser/greater than `element`),\\n /// either array length minus 1, or 0 are returned\\n /// @dev The time complexity of the search is O(log n).\\n /// @dev Inspired from OpenZeppelin Contracts v4.4.1:\\n /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Arrays.sol\\n /// @dev Modified by Angle Labs to support `uint64`, monotonous arrays and exclusive upper bounds\\n function findLowerBound(\\n bool increasingArray,\\n uint64[] memory array,\\n uint64 normalizerArray,\\n uint64 element\\n )\\n internal\\n pure\\n returns (uint256)\\n {\\n if (array.length == 0) {\\n return 0;\\n }\\n uint256 low = 1;\\n uint256 high = array.length;\\n\\n if (\\n (increasingArray && array[high - 1] * normalizerArray <= element)\\n || (!increasingArray && array[high - 1] * normalizerArray >= element)\\n ) return high - 1;\\n\\n while (low < high) {\\n uint256 mid = Math.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (increasingArray ? array[mid] * normalizerArray > element : array[mid] * normalizerArray < element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound.\\n // `low - 1` is the inclusive lower bound.\\n return low - 1;\\n }\\n\\n /// @notice Evaluates for `x` a piecewise linear function defined with the breaking points in the arrays\\n /// `xArray` and `yArray`\\n /// @dev The values in the `xArray` must be increasing\\n function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) {\\n uint256 indexLowerBound = findLowerBound(true, xArray, 1, x);\\n if (indexLowerBound == 0 && x < xArray[0]) return yArray[0];\\n else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1];\\n return yArray[indexLowerBound]\\n + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound]))\\n / int64(xArray[indexLowerBound + 1] - xArray[indexLowerBound]);\\n }\\n}\\n\",\"keccak256\":\"0x38b35fc8f8bbab2d883236c749de9882262c44162e1da896e2a598cdf52d3f43\",\"license\":\"GPL-3.0\"},\"project/contracts/parallelizer/libraries/LibManager.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IManager } from \\\"contracts/interfaces/IManager.sol\\\";\\n\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibManager\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev Managed collateral assets may be handled through external smart contracts or directly through this library\\n/// @dev There is no implementation at this point for a managed collateral handled through this library, and\\n/// a new specific `ManagerType` would need to be added in this case\\n/// @dev This library is an authorized fork of Angle's `LibManager` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibManager.sol\\nlibrary LibManager {\\n /// @notice Checks to which address managed funds must be transferred\\n function transferRecipient(bytes memory config) internal view returns (address recipient) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n recipient = address(this);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (address));\\n }\\n\\n /// @notice Performs a transfer of `token` for a collateral that is managed to a `to` address\\n /// @dev `token` may not be the actual collateral itself, as some collaterals have subcollaterals associated\\n /// with it\\n /// @dev Eventually pulls funds from strategies\\n function release(address token, address to, uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).release(token, to, amount);\\n }\\n\\n /// @notice Gets the balances of all the tokens controlled through `managerData`\\n /// @return balances An array of size `subCollaterals` with current balances of all subCollaterals\\n /// including the one corresponding to the `managerData` given\\n /// @return totalValue The value of all the `subCollaterals` in `collateral`\\n /// @dev `subCollaterals` must always have as first token (index 0) the collateral itself\\n function totalAssets(bytes memory config) internal view returns (uint256[] memory balances, uint256 totalValue) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).totalAssets();\\n }\\n\\n /// @notice Calls a hook if needed after new funds have been transfered to a manager\\n function invest(uint256 amount, bytes memory config) internal {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) abi.decode(data, (IManager)).invest(amount);\\n }\\n\\n /// @notice Returns available underlying tokens, for instance if liquidity is fully used and\\n /// not withdrawable the function will return 0\\n function maxAvailable(bytes memory config) internal view returns (uint256 available) {\\n (ManagerType managerType, bytes memory data) = parseManagerConfig(config);\\n if (managerType == ManagerType.EXTERNAL) return abi.decode(data, (IManager)).maxAvailable();\\n }\\n\\n /// @notice Decodes the `managerData` associated to a collateral\\n function parseManagerConfig(bytes memory config) internal pure returns (ManagerType managerType, bytes memory data) {\\n (managerType, data) = abi.decode(config, (ManagerType, bytes));\\n }\\n}\\n\",\"keccak256\":\"0xbf82c4b1f0f3945fb8efe73d2edb19d01672dad6081288060e43b02eb26fd562\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IParallelizerOracle } from \\\"contracts/interfaces/IParallelizerOracle.sol\\\";\\nimport { AggregatorV3Interface } from \\\"contracts/interfaces/external/chainlink/AggregatorV3Interface.sol\\\";\\nimport { IMorphoOracle } from \\\"contracts/interfaces/external/morpho/IMorphoOracle.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibOracle\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibOracle` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibOracle.sol\\nlibrary LibOracle {\\n /// @notice Emitted when a MAX target price is ratcheted up by `updateOracle`\\n event OracleTargetUpdated(address indexed collateral, uint256 previousTarget, uint256 newTarget);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ACTIONS SPECIFIC ORACLES\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads the oracle value used during a redemption to compute collateral ratio for `oracleConfig`\\n /// @dev This value is only sensitive to compute the collateral ratio and deduce a penalty factor\\n function readRedemption(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (OracleReadType oracleType, OracleReadType targetType, bytes memory oracleData, bytes memory targetData,) =\\n _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readRedemption();\\n } else {\\n (oracleValue,) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, 0);\\n return oracleValue;\\n }\\n }\\n\\n /// @notice Reads the oracle value used during mint operations for an asset with `oracleConfig`\\n /// @dev For assets which do not rely on external oracles, this value is the minimum between the processed oracle\\n /// value for the asset and its target price\\n function readMint(bytes memory oracleConfig) internal view returns (uint256 oracleValue) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readMint();\\n }\\n\\n (uint128 userDeviation,) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n if (targetPrice < oracleValue) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads the oracle value used for a burn operation for an asset with `oracleConfig`\\n /// @return oracleValue The actual oracle value obtained\\n /// @return ratio If `oracle value < target price`, the ratio between the oracle value and the target\\n /// price, otherwise `BASE_18`\\n function readBurn(bytes memory oracleConfig) internal view returns (uint256 oracleValue, uint256 ratio) {\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(oracleConfig);\\n if (oracleType == OracleReadType.EXTERNAL) {\\n IParallelizerOracle externalOracle = abi.decode(oracleData, (IParallelizerOracle));\\n return externalOracle.readBurn();\\n }\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n uint256 targetPrice;\\n (oracleValue, targetPrice) = readSpotAndTarget(oracleType, targetType, oracleData, targetData, userDeviation);\\n // Firewall in case the oracle value reported is low compared to the target\\n // If the oracle value is slightly below its target, then no deviation is reported for the oracle and\\n // the price of burning the stablecoin for other assets is not impacted. Also, the oracle value of this asset\\n // is set to the target price, to not be open to direct arbitrage\\n ratio = BASE_18;\\n if (oracleValue * BASE_18 < targetPrice * (BASE_18 - burnRatioDeviation)) {\\n ratio = (oracleValue * BASE_18) / targetPrice;\\n } else if (oracleValue < targetPrice) {\\n oracleValue = targetPrice;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n VIEW FUNCTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of the `getOracle` function\\n function getOracle(address collateral)\\n internal\\n view\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return _parseOracleConfig(s.transmuterStorage().collaterals[collateral].oracleConfig);\\n }\\n\\n /// @notice Gets the oracle value and the ratio with respect to the target price when it comes to\\n /// burning for `collateral`\\n function getBurnOracle(\\n address collateral,\\n bytes memory oracleConfig\\n )\\n internal\\n view\\n returns (uint256 minRatio, uint256 oracleValue)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n minRatio = BASE_18;\\n address[] memory collateralList = ts.collateralList;\\n uint256 length = collateralList.length;\\n for (uint256 i; i < length; ++i) {\\n uint256 ratioObserved = BASE_18;\\n if (collateralList[i] != collateral) {\\n (, ratioObserved) = readBurn(ts.collaterals[collateralList[i]].oracleConfig);\\n } else {\\n (oracleValue, ratioObserved) = readBurn(oracleConfig);\\n }\\n if (ratioObserved < minRatio) minRatio = ratioObserved;\\n }\\n }\\n\\n /// @notice Computes the `quoteAmount` (for Chainlink oracles) depending on a `quoteType` and a base value\\n /// (e.g the target price of the asset)\\n /// @dev For cases where the Chainlink feed directly looks into the value of the asset, `quoteAmount` is `BASE_18`.\\n /// For others, like wstETH for which Chainlink only has an oracle for stETH, `quoteAmount` is the target price\\n function quoteAmount(OracleQuoteType quoteType, uint256 baseValue) internal pure returns (uint256) {\\n if (quoteType == OracleQuoteType.UNIT) return BASE_18;\\n else return baseValue;\\n }\\n\\n function readSpotAndTarget(\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n uint256 deviation\\n )\\n internal\\n view\\n returns (uint256 oracleValue, uint256 targetPrice)\\n {\\n targetPrice = read(targetType, BASE_18, targetData);\\n oracleValue = read(oracleType, targetPrice, oracleData);\\n // System may tolerate small deviations from target\\n // If the oracle value reported is reasonably close to the target\\n // --> disregard the oracle value and return the target price\\n if (\\n targetPrice * (BASE_18 - deviation) < oracleValue * BASE_18\\n && oracleValue * BASE_18 < targetPrice * (BASE_18 + deviation)\\n ) oracleValue = targetPrice;\\n }\\n\\n /// @notice Reads an oracle value (or a target oracle value) for an asset based on its data parsed `oracleConfig`\\n function read(OracleReadType readType, uint256 baseValue, bytes memory data) internal view returns (uint256) {\\n if (readType == OracleReadType.CHAINLINK_FEEDS) {\\n (\\n AggregatorV3Interface[] memory circuitChainlink,\\n uint32[] memory stalePeriods,\\n uint8[] memory circuitChainIsMultiplied,\\n uint8[] memory chainlinkDecimals,\\n OracleQuoteType quoteType\\n ) = abi.decode(data, (AggregatorV3Interface[], uint32[], uint8[], uint8[], OracleQuoteType));\\n uint256 quotePrice = quoteAmount(quoteType, baseValue);\\n uint256 listLength = circuitChainlink.length;\\n for (uint256 i; i < listLength; ++i) {\\n quotePrice = readChainlinkFeed(\\n quotePrice, circuitChainlink[i], circuitChainIsMultiplied[i], chainlinkDecimals[i], stalePeriods[i]\\n );\\n }\\n return quotePrice;\\n } else if (readType == OracleReadType.STABLE) {\\n return BASE_18;\\n } else if (readType == OracleReadType.NO_ORACLE) {\\n return baseValue;\\n } else if (readType == OracleReadType.WSTETH) {\\n return STETH.getPooledEthByShares(1 ether);\\n } else if (readType == OracleReadType.CBETH) {\\n return CBETH.exchangeRate();\\n } else if (readType == OracleReadType.RETH) {\\n return RETH.getExchangeRate();\\n } else if (readType == OracleReadType.SFRXETH) {\\n return SFRXETH.pricePerShare();\\n } else if (readType == OracleReadType.MAX) {\\n uint256 maxValue = abi.decode(data, (uint256));\\n return maxValue;\\n } else if (readType == OracleReadType.MORPHO_ORACLE) {\\n (address contractAddress, uint256 normalizationFactor) = abi.decode(data, (address, uint256));\\n return IMorphoOracle(contractAddress).price() / normalizationFactor;\\n }\\n // If the `OracleReadType` is `EXTERNAL`, it means that this function is called to compute a\\n // `targetPrice` in which case the `baseValue` is returned here\\n else {\\n return baseValue;\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n SPECIFIC HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Reads a Chainlink feed using a quote amount and converts the quote amount to the out-currency\\n /// @param _quoteAmount The amount for which to compute the price expressed in `BASE_18`\\n /// @param feed Chainlink feed to query\\n /// @param multiplied Whether the ratio outputted by Chainlink should be multiplied or divided to the `quoteAmount`\\n /// @param decimals Number of decimals of the corresponding Chainlink pair\\n /// @return The `quoteAmount` converted in out-currency\\n function readChainlinkFeed(\\n uint256 _quoteAmount,\\n AggregatorV3Interface feed,\\n uint8 multiplied,\\n uint256 decimals,\\n uint32 stalePeriod\\n )\\n internal\\n view\\n returns (uint256)\\n {\\n (, int256 ratio,, uint256 updatedAt,) = feed.latestRoundData();\\n if (ratio <= 0 || block.timestamp - updatedAt > stalePeriod) revert InvalidChainlinkRate();\\n // Checking whether we should multiply or divide by the ratio computed\\n if (multiplied == 1) return (_quoteAmount * uint256(ratio)) / (10 ** decimals);\\n else return (_quoteAmount * (10 ** decimals)) / uint256(ratio);\\n }\\n\\n /// @notice Parses an `oracleConfig` into several sub fields\\n function _parseOracleConfig(bytes memory oracleConfig)\\n private\\n pure\\n returns (OracleReadType, OracleReadType, bytes memory, bytes memory, bytes memory)\\n {\\n return abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n }\\n\\n /// @notice Seeds the MAX target with the current spot at deployment\\n /// @dev `updateOracle` bounds each step against the stored target, so a target left at 0 can never be raised\\n function initializeOracleTarget(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n // Only an unset target may be seeded, so this cannot sidestep the ratchet later on\\n if (abi.decode(targetData, (uint256)) != 0) revert OracleUpdateFailed();\\n\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n if (oracleValue == 0) revert OracleUpdateFailed();\\n\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, 0, oracleValue);\\n }\\n\\n function updateOracle(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.collaterals[collateral].decimals == 0) revert NotCollateral();\\n\\n (\\n OracleReadType oracleType,\\n OracleReadType targetType,\\n bytes memory oracleData,\\n bytes memory targetData,\\n bytes memory hyperparameters\\n ) = _parseOracleConfig(ts.collaterals[collateral].oracleConfig);\\n\\n if (targetType != OracleReadType.MAX) revert OracleUpdateFailed();\\n uint256 oracleValue = read(oracleType, BASE_18, oracleData);\\n\\n uint256 maxValue = abi.decode(targetData, (uint256));\\n // The ratchet is one-way and only governance can lower the target again through `setOracle`, so a single\\n // update is bounded: a transient upward print cannot be locked in beyond `MAX_ORACLE_RATCHET_STEP`\\n if (oracleValue <= maxValue || oracleValue * BASE_18 > maxValue * (BASE_18 + MAX_ORACLE_RATCHET_STEP)) {\\n revert OracleUpdateFailed();\\n }\\n ts.collaterals[collateral].oracleConfig =\\n abi.encode(oracleType, targetType, oracleData, abi.encode(oracleValue), hyperparameters);\\n emit OracleTargetUpdated(collateral, maxValue, oracleValue);\\n }\\n}\\n\",\"keccak256\":\"0x60e54568d2d7398c6a5ab8c40eb3cb59d7851794292dd54420998cfaffc9ab3e\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSetters.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport { LibSurplus } from \\\"./LibSurplus.sol\\\";\\nimport { LibManager } from \\\"./LibManager.sol\\\";\\nimport { LibOracle } from \\\"./LibOracle.sol\\\";\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\nimport { LibDiamond } from \\\"./LibDiamond.sol\\\";\\nimport { LibWhitelist } from \\\"./LibWhitelist.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSetters\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibSetters` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibSetters.sol\\nlibrary LibSetters {\\n using SafeCast for uint256;\\n\\n event CollateralAdded(address indexed collateral);\\n event CollateralManagerSet(address indexed collateral, ManagerStorage managerData);\\n event CollateralRevoked(address indexed collateral);\\n event CollateralWhitelistStatusUpdated(address indexed collateral, bytes whitelistData, uint8 whitelistStatus);\\n event FeesSet(address indexed collateral, uint64[] xFee, int64[] yFee, bool mint);\\n event OracleSet(address indexed collateral, bytes oracleConfig);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event PauseToggled(address indexed collateral, uint256 pausedType, bool isPaused);\\n event RedemptionCurveParamsSet(uint64[] xFee, int64[] yFee);\\n event ReservesAdjusted(address indexed collateral, uint256 amount, bool increase);\\n event StablecoinCapSet(address indexed collateral, uint256 stablecoinCap);\\n event TrustedToggled(address indexed sender, bool isTrusted, TrustedType trustedType);\\n event WhitelistStatusToggled(WhitelistType whitelistType, address indexed who, uint256 whitelistStatus);\\n event PayeeAdded(address indexed payee, uint256 shares);\\n event SlippageToleranceUpdated(address indexed collateral, uint256 slippageTolerance);\\n event SurplusBufferRatioUpdated(uint64 surplusBufferRatio);\\n event SwapRouterUpdated(address indexed swapRouter);\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GOVERNOR ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `setAccessManager`\\n function setAccessManager(IAccessManager _newAccessManager) internal {\\n if (address(_newAccessManager).code.length == 0) revert InvalidAccessManager();\\n DiamondStorage storage ds = s.diamondStorage();\\n address previousAccessManager = address(ds.accessManager);\\n ds.accessManager = _newAccessManager;\\n emit OwnershipTransferred(previousAccessManager, address(_newAccessManager));\\n }\\n\\n /// @notice Internal version of `setCollateralManager`\\n function setCollateralManager(\\n address collateral,\\n bool checkExternalManagerBalance,\\n ManagerStorage memory managerData\\n )\\n internal\\n {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n if (managerData.config.length != 0) {\\n // The first subCollateral given should be the actual collateral asset\\n if (address(managerData.subCollaterals[0]) != collateral) revert InvalidParams();\\n // Sanity check on the manager data that is passed\\n LibManager.parseManagerConfig(managerData.config);\\n collatInfo.isManaged = 1;\\n } else {\\n collatInfo.isManaged = 0;\\n }\\n collatInfo.managerData = managerData;\\n emit CollateralManagerSet(collateral, managerData);\\n }\\n\\n /// @notice Internal version of `toggleTrusted`\\n function toggleTrusted(address sender, TrustedType t) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 trustedStatus;\\n if (t == TrustedType.Updater) {\\n trustedStatus = 1 - ts.isTrusted[sender];\\n ts.isTrusted[sender] = trustedStatus;\\n } else {\\n trustedStatus = 1 - ts.isSellerTrusted[sender];\\n ts.isSellerTrusted[sender] = trustedStatus;\\n }\\n emit TrustedToggled(sender, trustedStatus == 1, t);\\n }\\n\\n /// @notice Internal version of `addCollateral`\\n function addCollateral(address collateral) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals != 0) revert AlreadyAdded();\\n collatInfo.decimals = uint8(IERC20Metadata(collateral).decimals());\\n ts.collateralList.push(collateral);\\n emit CollateralAdded(collateral);\\n }\\n\\n /// @notice Internal version of `adjustStablecoins`\\n function adjustStablecoins(address collateral, uint128 amount, bool increase) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint128 normalizedAmount = ((amount * BASE_27) / ts.normalizer).toUint128();\\n if (increase) {\\n collatInfo.normalizedStables = collatInfo.normalizedStables + uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables + normalizedAmount;\\n if (uint256(collatInfo.normalizedStables) * uint256(ts.normalizer) / BASE_27 > collatInfo.stablecoinCap) {\\n revert AboveCap();\\n }\\n } else {\\n collatInfo.normalizedStables = collatInfo.normalizedStables - uint216(normalizedAmount);\\n ts.normalizedStables = ts.normalizedStables - normalizedAmount;\\n }\\n emit ReservesAdjusted(collateral, amount, increase);\\n }\\n\\n /// @notice Internal version of `revokeCollateral`\\n function revokeCollateral(address collateral, bool checkExternalManagerBalance) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (collatInfo.normalizedStables > 0) revert CollateralBacked();\\n uint8 isManaged = collatInfo.isManaged;\\n if (isManaged > 0 && checkExternalManagerBalance) {\\n (, uint256 totalValue) = LibManager.totalAssets(collatInfo.managerData.config);\\n if (totalValue > 0) revert ManagerHasAssets();\\n }\\n delete ts.collaterals[collateral];\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n for (uint256 i; i < length - 1; ++i) {\\n if (collateralListMem[i] == collateral) {\\n ts.collateralList[i] = collateralListMem[length - 1];\\n break;\\n }\\n }\\n ts.collateralList.pop();\\n emit CollateralRevoked(collateral);\\n }\\n\\n /// @notice Internal version of `setOracle`\\n function setOracle(address collateral, bytes memory oracleConfig) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n (,,,, bytes memory hyperparameters) =\\n abi.decode(oracleConfig, (OracleReadType, OracleReadType, bytes, bytes, bytes));\\n (uint128 userDeviation, uint128 burnRatioDeviation) = abi.decode(hyperparameters, (uint128, uint128));\\n if (userDeviation > burnRatioDeviation) revert InvalidParams();\\n // Checks oracle validity\\n LibOracle.readMint(oracleConfig);\\n collatInfo.oracleConfig = oracleConfig;\\n emit OracleSet(collateral, oracleConfig);\\n }\\n\\n /// @notice Internal version of `setWhitelistStatus`\\n function setWhitelistStatus(address collateral, uint8 whitelistStatus, bytes memory whitelistData) internal {\\n if (whitelistStatus > 1) revert InvalidWhitelistStatus();\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n if (whitelistStatus == 1) {\\n // Sanity check\\n LibWhitelist.checkWhitelist(whitelistData, address(this));\\n collatInfo.whitelistData = whitelistData;\\n } else {\\n // If whitelist is revoked, clear the whitelist data\\n collatInfo.whitelistData = \\\"\\\";\\n }\\n collatInfo.onlyWhitelisted = whitelistStatus;\\n emit CollateralWhitelistStatusUpdated(collateral, collatInfo.whitelistData, whitelistStatus);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n ONLY GUARDIAN ACTIONS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Internal version of `pause` \\u2014 sets the action's live flag to `0`\\n /// @dev Reverts with `AlreadyPaused` if the action is already paused so a no-op governance\\n /// call cannot pass silently\\n function pause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 0);\\n }\\n\\n /// @notice Internal version of `unpause` \\u2014 sets the action's live flag to `1`\\n /// @dev Reverts with `NotPaused` if the action is already unpaused so a no-op governance\\n /// call cannot pass silently\\n function unpause(address collateral, ActionType action) internal {\\n _setPauseState(collateral, action, 1);\\n }\\n\\n /// @dev Shared accessor for `pause` and `unpause`. `targetIsLive` is `0` to pause and `1`\\n /// to unpause. Reverts on no-op transitions.\\n function _setPauseState(address collateral, ActionType action, uint8 targetIsLive) private {\\n if (action == ActionType.Mint || action == ActionType.Burn) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n uint8 currentIsLive = action == ActionType.Mint ? collatInfo.isMintLive : collatInfo.isBurnLive;\\n if (currentIsLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n if (action == ActionType.Mint) {\\n collatInfo.isMintLive = targetIsLive;\\n } else {\\n collatInfo.isBurnLive = targetIsLive;\\n }\\n } else {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.isRedemptionLive == targetIsLive) {\\n if (targetIsLive == 0) revert AlreadyPaused();\\n revert NotPaused();\\n }\\n ts.isRedemptionLive = targetIsLive;\\n }\\n emit PauseToggled(collateral, uint256(action), targetIsLive == 0);\\n }\\n\\n /// @notice Internal version of `setFees`\\n function setFees(address collateral, uint64[] memory xFee, int64[] memory yFee, bool mint) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n checkFees(xFee, yFee, mint ? ActionType.Mint : ActionType.Burn);\\n if (mint) {\\n collatInfo.xFeeMint = xFee;\\n collatInfo.yFeeMint = yFee;\\n } else {\\n collatInfo.xFeeBurn = xFee;\\n collatInfo.yFeeBurn = yFee;\\n }\\n emit FeesSet(collateral, xFee, yFee, mint);\\n }\\n\\n /// @notice Internal version of `setRedemptionCurveParams`\\n function setRedemptionCurveParams(uint64[] memory xFee, int64[] memory yFee) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n LibSetters.checkFees(xFee, yFee, ActionType.Redeem);\\n ts.xRedemptionCurve = xFee;\\n ts.yRedemptionCurve = yFee;\\n emit RedemptionCurveParamsSet(xFee, yFee);\\n }\\n\\n /// @notice Internal version of `toggleWhitelist`\\n function toggleWhitelist(WhitelistType whitelistType, address who) internal {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n uint256 whitelistStatus = 1 - ts.isWhitelistedForType[whitelistType][who];\\n ts.isWhitelistedForType[whitelistType][who] = whitelistStatus;\\n emit WhitelistStatusToggled(whitelistType, who, whitelistStatus);\\n }\\n\\n /// @notice Sets the stablecoin cap that can be issued from a collateral\\n function setStablecoinCap(address collateral, uint256 stablecoinCap) internal {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.decimals == 0) revert NotCollateral();\\n collatInfo.stablecoinCap = stablecoinCap;\\n emit StablecoinCapSet(collateral, stablecoinCap);\\n }\\n\\n /// @notice Internal version of `updatePayees`\\n function updatePayees(address[] memory _payees, uint256[] memory _shares, bool _skipRelease) internal {\\n if (_payees.length == 0 || _payees.length > MAX_PAYEES) revert InvalidLengths();\\n if (_payees.length != _shares.length) revert ArrayLengthMismatch();\\n /// @dev Distribute the fees before updating the fee receivers.\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (!_skipRelease) {\\n uint256 income = ts.tokenP.balanceOf(address(this));\\n if (income > 0 && ts.payees.length > 0) {\\n LibSurplus.release(income, ts.payees);\\n }\\n }\\n\\n // Zero out stale shares for old payees\\n uint256 i = 0;\\n for (; i < ts.payees.length; ++i) {\\n ts.shares[ts.payees[i]] = 0;\\n }\\n delete ts.payees;\\n uint256 _totalShares = 0;\\n i = 0;\\n for (; i < _payees.length; ++i) {\\n for (uint256 j = 0; j < i; ++j) {\\n if (_payees[j] == _payees[i]) revert AlreadyAdded();\\n }\\n _totalShares += _addPayee(_payees[i], _shares[i]);\\n }\\n ts.totalShares = _totalShares;\\n }\\n\\n /// @notice Internal version of `updateSlippageTolerance`\\n function updateSlippageTolerance(address collateral, uint256 slippageTolerance) internal {\\n if (slippageTolerance > BASE_9) revert InvalidRate();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.slippageTolerance[collateral] = slippageTolerance;\\n emit SlippageToleranceUpdated(collateral, slippageTolerance);\\n }\\n\\n /// @notice Internal version of `setSwapRouter`\\n function setSwapRouter(address swapRouter) internal {\\n if (swapRouter == address(0)) revert ZeroAddress();\\n s.transmuterStorage().swapRouter = swapRouter;\\n emit SwapRouterUpdated(swapRouter);\\n }\\n\\n /// @notice Internal version of `updateSurplusBufferRatio`\\n function updateSurplusBufferRatio(uint64 _surplusBufferRatio) internal {\\n if (_surplusBufferRatio < uint64(BASE_9)) revert InvalidParam();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.surplusBufferRatio = _surplusBufferRatio;\\n emit SurplusBufferRatioUpdated(_surplusBufferRatio);\\n }\\n\\n /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n HELPERS\\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n /// @notice Checks the fee values given for the `mint`, `burn`, and `redeem` functions\\n function checkFees(uint64[] memory xFee, int64[] memory yFee, ActionType action) internal view {\\n uint256 n = xFee.length;\\n if (n != yFee.length || n == 0) revert InvalidParams();\\n if (\\n // Mint inflexion points should be in [0,BASE_9[\\n // We have: amountPostFee * (BASE_9 + yFeeMint) = amountPreFee * BASE_9\\n // Hence we consider BASE_12 as the max value (100% fees) for yFeeMint\\n // Burn inflexion points should be in [0,BASE_9] but fees should be constant in\\n // the first segment [BASE_9, x_{n-1}[\\n // Redemption inflexion points should be in [0,BASE_9]\\n (action == ActionType.Mint && (xFee[n - 1] >= BASE_9 || xFee[0] != 0 || yFee[n - 1] > int256(BASE_12)))\\n || (action == ActionType.Burn\\n && (xFee[0] != BASE_9 || yFee[n - 1] > int256(BASE_9) || (n > 1 && (yFee[0] != yFee[1]))))\\n || (action == ActionType.Redeem && (xFee[n - 1] > BASE_9 || yFee[n - 1] < 0 || yFee[n - 1] > int256(BASE_9)))\\n ) {\\n revert InvalidParams();\\n }\\n\\n for (uint256 i; i < n - 1; ++i) {\\n if (\\n // xFee strictly increasing and yFee increasing for mints\\n // xFee strictly decreasing and yFee increasing for burns\\n // xFee strictly increasing and yFee should be in [0,BASE_9] for redemptions\\n (action == ActionType.Mint && (xFee[i] >= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Burn && (xFee[i] <= xFee[i + 1] || (yFee[i + 1] < yFee[i])))\\n || (action == ActionType.Redeem && (xFee[i] >= xFee[i + 1] || yFee[i] < 0 || yFee[i] > int256(BASE_9)))\\n ) revert InvalidParams();\\n }\\n\\n // If a mint or burn fee is negative, we need to check that accounts atomically minting\\n // (from any collateral) and then burning cannot get more than their initial value\\n if (yFee[0] < 0) {\\n if (!LibDiamond.isGovernor(msg.sender)) revert NotGovernor(); // Only governor can set negative fees\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n address[] memory collateralListMem = ts.collateralList;\\n uint256 length = collateralListMem.length;\\n if (action == ActionType.Mint) {\\n // This can be mathematically expressed by `(1-min_c(burnFee_c))<=(1+mintFee[0])`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory burnFees = ts.collaterals[collateralListMem[i]].yFeeBurn;\\n if (burnFees[0] + yFee[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n if (action == ActionType.Burn) {\\n // This can be mathematically expressed by `(1-burnFee[0])<=(1+min_c(mintFee_c))`\\n for (uint256 i; i < length; ++i) {\\n int64[] memory mintFees = ts.collaterals[collateralListMem[i]].yFeeMint;\\n if (yFee[0] + mintFees[0] < 0) revert InvalidNegativeFees();\\n }\\n }\\n }\\n }\\n\\n /// @notice Add a new fee receiver.\\n /// @param _payee The address of the fee receiver.\\n /// @param _shares The number of shares assigned to the fee receiver.\\n function _addPayee(address _payee, uint256 _shares) internal returns (uint256) {\\n if (_shares == 0) revert ZeroAmount();\\n // The Parallelizer holds the income being distributed, so a share allocated to itself is handed\\n // back to `release` as fresh income on the next call. `address(0)` stays valid: `LibSurplus`\\n // treats it as the sentinel for burning that share.\\n if (_payee == address(this)) revert InvalidPayee();\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n\\n ts.payees.push(_payee);\\n ts.shares[_payee] = _shares;\\n emit PayeeAdded(_payee, _shares);\\n return _shares;\\n }\\n}\\n\",\"keccak256\":\"0x45ed1863aec8d20f3659d2b0ea657b629b5c33b71f895ae6775ea72156203197\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport { DiamondStorage, ImplementationStorage, ParallelizerStorage } from \\\"../Storage.sol\\\";\\n\\n/// @title LibStorage\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibStorage` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibStorage.sol\\nlibrary LibStorage {\\n /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic of the different facets used in the diamond proxy\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ds.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot\\n /// @dev This struct handles the particular logic of the Parallelizer system\\n function transmuterStorage() internal pure returns (ParallelizerStorage storage ts) {\\n bytes32 position = TRANSMUTER_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ts.slot := position\\n }\\n }\\n\\n /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot\\n /// @dev This struct handles the logic for making the contract easily usable on Etherscan\\n function implementationStorage() internal pure returns (ImplementationStorage storage ims) {\\n bytes32 position = IMPLEMENTATION_STORAGE_POSITION;\\n assembly (\\\"memory-safe\\\") {\\n ims.slot := position\\n }\\n }\\n}\\n\",\"keccak256\":\"0x081108bb060800509deb24387ffd0199a3f93f933c3f59c8fc14eb536790fe04\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibSurplus.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Math } from \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\nimport { LibManager } from \\\"../libraries/LibManager.sol\\\";\\nimport { LibOracle } from \\\"../libraries/LibOracle.sol\\\";\\nimport { LibGetters } from \\\"../libraries/LibGetters.sol\\\";\\nimport { LibHelpers } from \\\"../libraries/LibHelpers.sol\\\";\\nimport { LibStorage as s } from \\\"../libraries/LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Constants.sol\\\";\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibSurplus\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\nlibrary LibSurplus {\\n using SafeERC20 for IERC20;\\n using Math for uint256;\\n\\n event IncomeReleased(uint256 income, uint256 releasedAt);\\n event IncomeReleasedToPayee(uint256 income, address payee, uint256 releasedAt);\\n\\n /// @notice Internal version of `release`\\n function release(\\n uint256 _incomeToRelease,\\n address[] memory _payees\\n )\\n internal\\n returns (address[] memory payees, uint256[] memory amounts)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n ts.lastReleasedAt = block.timestamp;\\n uint256 i;\\n amounts = new uint256[](_payees.length);\\n for (; i < _payees.length; ++i) {\\n address payee = _payees[i];\\n amounts[i] = _release(_incomeToRelease, payee, ts);\\n }\\n\\n emit IncomeReleased(_incomeToRelease, ts.lastReleasedAt);\\n return (_payees, amounts);\\n }\\n\\n /// @notice Internal function to release a percentage of income to a specific payee.\\n /// @dev uses totalShares to calculate correct share.\\n /// @param _totalIncomeReceived Total income for all payees, will be split according to shares.\\n /// @param _payee The address of the payee to whom to distribute the fees.\\n /// @param _ts The contract storage.\\n /// @return income The amount transfer to the payee.\\n function _release(\\n uint256 _totalIncomeReceived,\\n address _payee,\\n ParallelizerStorage storage _ts\\n )\\n internal\\n returns (uint256 income)\\n {\\n income = _totalIncomeReceived.mulDiv(_ts.shares[_payee], _ts.totalShares);\\n if (_payee == address(0)) {\\n _ts.tokenP.burnSelf(income, address(this));\\n } else {\\n IERC20(address(_ts.tokenP)).safeTransfer(_payee, income);\\n }\\n emit IncomeReleasedToPayee(income, _payee, _ts.lastReleasedAt);\\n }\\n\\n /// @notice Computes the surplus of a collateral.\\n /// @param collateral The collateral address to compute the surplus of.\\n /// @return collateralSurplus The collateral surplus amount.\\n /// @return stableSurplus The surplus in stable amount.\\n function _computeCollateralSurplus(address collateral)\\n internal\\n view\\n returns (uint256 collateralSurplus, uint256 stableSurplus)\\n {\\n ParallelizerStorage storage ts = s.transmuterStorage();\\n if (ts.surplusBufferRatio == 0) revert SurplusBufferRatioNotSet();\\n Collateral storage collatInfo = ts.collaterals[collateral];\\n uint256 collateralBalance = _getCollateralBalance(collateral);\\n uint256 redemptionValue = LibOracle.readRedemption(collatInfo.oracleConfig);\\n uint256 mintValue = LibOracle.readMint(collatInfo.oracleConfig);\\n // Use the lower oracle value to conservatively size the surplus, preventing over-extraction\\n // that would cause the post-swap CR check (which uses readRedemption) to revert\\n uint256 totalCollateralValue = LibHelpers.convertDecimalTo(\\n Math.min(redemptionValue, mintValue) * collateralBalance, 18 + collatInfo.decimals, 18, Math.Rounding.Floor\\n );\\n uint256 stablesBacked = (uint256(collatInfo.normalizedStables) * ts.normalizer) / BASE_27;\\n // Compute the max stables that can be backed while maintaining the buffer ratio\\n uint256 maxBackable = (totalCollateralValue * BASE_9) / ts.surplusBufferRatio;\\n if (maxBackable <= stablesBacked) revert ZeroSurplusAmount();\\n stableSurplus = maxBackable - stablesBacked;\\n // Cap per-collateral surplus by global extractable surplus\\n stableSurplus = Math.min(stableSurplus, _calculateGlobalExtractableSurplus(ts.surplusBufferRatio));\\n if (stableSurplus == 0) revert ZeroSurplusAmount();\\n collateralSurplus =\\n LibHelpers.convertDecimalTo((stableSurplus * BASE_18) / mintValue, 18, collatInfo.decimals, Math.Rounding.Floor);\\n }\\n\\n /// @notice Computes the global extractable surplus above the surplus buffer ratio.\\n /// @param surplusBufferRatio The surplus buffer ratio.\\n /// @return globalStableSurplus The maximum stables that can be minted globally while maintaining the buffer ratio.\\n function _calculateGlobalExtractableSurplus(uint64 surplusBufferRatio)\\n internal\\n view\\n returns (uint256 globalStableSurplus)\\n {\\n (uint64 collatRatio, uint256 stablecoinsIssued,,,) = LibGetters.getCollateralRatio();\\n if (collatRatio <= surplusBufferRatio) revert ZeroSurplusAmount();\\n globalStableSurplus = stablecoinsIssued * (uint256(collatRatio) - surplusBufferRatio) / surplusBufferRatio;\\n }\\n\\n /// @notice Gets the balance of a collateral.\\n /// @dev If the collateral is managed, the balance is the total assets of the managed collateral.\\n /// @param collateral The collateral address to get the balance of.\\n /// @return balance The balance of the collateral.\\n function _getCollateralBalance(address collateral) internal view returns (uint256 balance) {\\n Collateral storage collatInfo = s.transmuterStorage().collaterals[collateral];\\n if (collatInfo.isManaged > 0) {\\n (, balance) = LibManager.totalAssets(collatInfo.managerData.config);\\n } else {\\n balance = IERC20(collateral).balanceOf(address(this));\\n }\\n }\\n\\n /// @notice Computes the minimum expected amount of stablecoins to receive for a given surplus.\\n /// @param stableSurplus The surplus in stable amount.\\n /// @param slippageTolerance The slippage tolerance.\\n /// @return minExpectedAmount The minimum expected amount of stablecoins to receive.\\n function _minExpectedAmount(\\n uint256 stableSurplus,\\n uint256 slippageTolerance\\n )\\n internal\\n pure\\n returns (uint256 minExpectedAmount)\\n {\\n return (stableSurplus * (BASE_9 - slippageTolerance)) / BASE_9;\\n }\\n}\\n\",\"keccak256\":\"0x7e475b445fab889d5aa9cbb19f6e5157e6d5f16af053a1202fadbeb89d123a79\",\"license\":\"BUSL-1.1\"},\"project/contracts/parallelizer/libraries/LibWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { IKeyringGuard } from \\\"contracts/interfaces/external/keyring/IKeyringGuard.sol\\\";\\n\\nimport { LibStorage as s } from \\\"./LibStorage.sol\\\";\\n\\nimport \\\"../../utils/Errors.sol\\\";\\nimport \\\"../Storage.sol\\\";\\n\\n/// @title LibWhitelist\\n/// @author Cooper Labs\\n/// @custom:contact security@cooperlabs.xyz\\n/// @dev This library is an authorized fork of Angle's `LibWhitelist` library\\n/// https://github.com/AngleProtocol/angle-transmuter/blob/main/contracts/transmuter/libraries/LibWhitelist.sol\\nlibrary LibWhitelist {\\n /// @notice Checks whether `sender` is whitelisted for a collateral with `whitelistData`\\n function checkWhitelist(bytes memory whitelistData, address sender) internal returns (bool) {\\n (WhitelistType whitelistType, bytes memory data) = abi.decode(whitelistData, (WhitelistType, bytes));\\n if (s.transmuterStorage().isWhitelistedForType[whitelistType][sender] > 0) return true;\\n if (data.length != 0) {\\n if (whitelistType == WhitelistType.BACKED) {\\n address keyringGuard = abi.decode(data, (address));\\n if (keyringGuard != address(0)) return IKeyringGuard(keyringGuard).isAuthorized(address(this), sender);\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x03e1552a11a9cfdfe83ad4d90111a72c44fa204a90b37cb19cbba185a04addc7\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nimport { ICbETH } from \\\"contracts/interfaces/external/coinbase/ICbETH.sol\\\";\\nimport { ISfrxETH } from \\\"contracts/interfaces/external/frax/ISfrxETH.sol\\\";\\nimport { IStETH } from \\\"contracts/interfaces/external/lido/IStETH.sol\\\";\\nimport { IRETH } from \\\"contracts/interfaces/external/rocketPool/IRETH.sol\\\";\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n STORAGE SLOTS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n/// @dev Storage position of `DiamondStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.diamond.storage\\\") - 1`\\nbytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;\\n\\n/// @dev Storage position of `ParallelizerStorage` structure\\n/// @dev Equals `keccak256(\\\"diamond.standard.parallelizer.storage\\\") - 1`\\nbytes32 constant TRANSMUTER_STORAGE_POSITION = 0x4b2dd303f68b99d244b702089c802b6e9ea1b5d4ef61fd436d6c41abb1178c75;\\n\\n/// @dev Storage position of `ImplementationStorage` structure\\n/// @dev Equals `keccak256(\\\"eip1967.proxy.implementation\\\") - 1`\\nbytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n MATHS\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\nuint256 constant BASE_6 = 1e6;\\nuint256 constant BASE_8 = 1e8;\\nuint256 constant BASE_9 = 1e9;\\nuint256 constant BASE_12 = 1e12;\\nuint256 constant BPS = 1e14;\\nuint256 constant BASE_18 = 1e18;\\nuint256 constant HALF_BASE_27 = 1e27 / 2;\\nuint256 constant BASE_27 = 1e27;\\nuint256 constant BASE_36 = 1e36;\\nuint256 constant MAX_BURN_FEE = 999_000_000;\\nuint256 constant MAX_MINT_FEE = BASE_12 - 1;\\nuint256 constant MAX_PAYEES = 10;\\nuint256 constant SECONDS_PER_YEAR = 365 days;\\nuint256 constant MAX_STORED_ASSETS_INIT_STALENESS = 30 minutes;\\n/// @dev Largest relative increase a single `updateOracle` ratchet may apply to a MAX target price\\nuint256 constant MAX_ORACLE_RATCHET_STEP = 5e16;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// The values being non-zero value makes deployment a bit more expensive,\\n// but in exchange the refund on every call to nonReentrant will be lower in\\n// amount. Since refunds are capped to a percentage of the total\\n// transaction's gas, it is best to keep them low in cases like this one, to\\n// increase the likelihood of the full refund coming into effect.\\nuint8 constant NOT_ENTERED = 1;\\nuint8 constant ENTERED = 2;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n REENTRANT\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\n// Role IDs for the AccessManager\\nuint64 constant GOVERNOR_ROLE = 10;\\nuint64 constant GUARDIAN_ROLE = 20;\\nuint64 constant KEEPER_ROLE = 30;\\n\\n/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\n COMMON ADDRESSES\\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/\\n\\naddress constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\\nICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);\\nIRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);\\nIStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);\\nISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);\\naddress constant XEVT = 0x3Ee320c9F73a84D1717557af00695A34b26d1F1d;\\naddress constant USDM = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;\\naddress constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;\\naddress constant EURC = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c;\\n\",\"keccak256\":\"0x8cf10b94d5483565f19c16e527c5e23b0a41f8065d8245c904be5d91ad5b2c03\",\"license\":\"BUSL-1.1\"},\"project/contracts/utils/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.28;\\n\\nerror AboveCap();\\nerror AccessManagedUnauthorized(address caller);\\nerror AlreadyAdded();\\nerror ArrayLengthMismatch();\\nerror AuthorizationTransferMismatch();\\nerror CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);\\nerror CannotAddSelectorsToZeroAddress(bytes4[] _selectors);\\nerror CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);\\nerror CannotRemoveImmutableFunction(bytes4 _selector);\\nerror CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);\\nerror CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);\\nerror CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);\\nerror CannotReplaceImmutableFunction(bytes4 _selector);\\nerror ContractHasNoCode();\\nerror CollateralBacked();\\nerror CannotBurnAllStableIssued();\\nerror FunctionNotFound(bytes4 _functionSelector);\\nerror IncorrectFacetCutAction(uint8 _action);\\nerror InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);\\nerror InvalidChainlinkRate();\\nerror InvalidLengths();\\nerror InvalidNegativeFees();\\nerror InvalidOracleType();\\nerror InvalidParam();\\nerror InvalidParams();\\nerror InvalidPayee();\\nerror InvalidRate();\\nerror InvalidSwap();\\nerror InvalidTokens();\\nerror InvalidAccessManager();\\nerror InvalidWhitelistStatus();\\nerror ManagerHasAssets();\\nerror NoSelectorsProvidedForFacetForCut(address _facetAddress);\\nerror NotAllowed();\\nerror NotCollateral();\\nerror NotGovernor();\\nerror NotGuardian();\\nerror NotTrusted();\\nerror NotTrustedOrGuardian();\\nerror NotWhitelisted();\\nerror RewardSwapFailed();\\nerror OracleUpdateFailed();\\nerror SurplusBufferRatioNotSet();\\nerror Paused();\\nerror AlreadyPaused();\\nerror NotPaused();\\nerror ReentrantCall();\\nerror RemoveFacetAddressMustBeZeroAddress(address _facetAddress);\\nerror TooBigAmountIn();\\nerror TooLate();\\nerror TooSmallAmountOut();\\nerror UnexpectedRedemptionTokens();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror ZeroSurplusAmount();\\nerror SwapError();\\nerror SlippageTooHigh();\\nerror InsufficientFunds();\\nerror Undercollateralized();\\nerror StaleAccrual();\\nerror NotInitialized();\\n\",\"keccak256\":\"0xc163f0995069ae58c8eb66225c1a4df84e94049b8bc6ff2fed348c3af4fcabaa\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "storageLayout": { "storage": [], "types": null }, "userdoc": { + "events": { + "OracleTargetUpdated(address,uint256,uint256)": { + "notice": "Emitted when a MAX target price is ratcheted up by `updateOracle`" + } + }, "kind": "user", "methods": { "addCollateral(address)": { @@ -836,6 +906,9 @@ "setOracle(address,bytes)": { "notice": "Sets the `oracleConfig` used to read the value of `collateral` for the mint, burn and redemption operations" }, + "setSwapRouter(address)": { + "notice": "Sets the aggregator or DEX the `RewardHandler` forwards its swap payload to" + }, "setWhitelistStatus(address,uint8,bytes)": { "notice": "Changes whether a `collateral` can only be handled during burns and redemptions by whitelisted addresses and sets the data used to read into the whitelist" }, @@ -859,13 +932,13 @@ }, "argsData": "0x", "transaction": { - "hash": "0xbce37119428133e82d039ae2497f7748db8defbf9e335c76a1de956961d42806", - "nonce": "0xe3", + "hash": "0x56346bc857a5620f551353232eade6a586a959435c3ddf11fbca2265c955fa3d", + "nonce": "0x106", "origin": "0x66CcEC236bbcE5f1bBd1b2fC0a4014e57A55ad02" }, "receipt": { - "blockHash": "0xfaebf09f0e9dbf39b33eea4da0d63616641e561d199600791086d3b85278cba8", - "blockNumber": "0x186a799", - "transactionIndex": "0x14" + "blockHash": "0x5d30189bad2941fffee209c43c6f2ba93062df1e5313c8431aa4290c47923061", + "blockNumber": "0x18ef45e", + "transactionIndex": "0x67" } } \ No newline at end of file