Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xef8629D568AdCa04D0aC52C7388d5377872d7F61
Balance 0 ETH
Nonce 1
Code Size 12365 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

12365 bytes
0x608060405234801561000f575f5ffd5b50600436106103b3575f3560e01c8063a342f238116101f5578063ce96cb7711610114578063edd9f83a116100a9578063f062858011610079578063f06285801461083a578063f2fde38b14610843578063f43f783214610856578063f6527dc914610869575f5ffd5b8063edd9f83a14610803578063eeb3c91014610814578063ef8b30f714610736578063f0119bc814610827575f5ffd5b8063e0a51374116100e4578063e0a51374146107cd578063e1e3dfeb146107d5578063e2c9acc1146107e8578063e74b981b146107f0575f5ffd5b8063ce96cb771461075c578063d48fbb951461076f578063d905777e14610782578063dd62ed3e14610795575f5ffd5b8063ba0876521161018a578063c63d75b61161015a578063c63d75b6146104ff578063c64d9d8614610723578063c6e6f59214610736578063c9411e2214610749575f5ffd5b8063ba087652146106d5578063bcf90d2b146106e8578063be670a46146106f1578063c5c9e47714610704575f5ffd5b8063b3d7f6b9116101c5578063b3d7f6b91461069f578063b44f9b48146106b2578063b460af94146106ba578063b9770397146106cd575f5ffd5b8063a342f23814610647578063a9059cbb1461065a578063aad4203a1461066d578063b1fb09f91461068c575f5ffd5b80634082fa9b116102e1578063772fbebf1161027657806395d89b411161024657806395d89b41146105e057806399170060146105e85780639acf5d34146105fb5780639be9afa81461061a575f5ffd5b8063772fbebf14610595578063821a622f146105a85780638da5cb5b146105bc57806394bf804d146105cd575f5ffd5b80635c975abb116102b15780635c975abb146105405780636e553f651461055257806370a0823114610565578063715018a61461058d575f5ffd5b80634082fa9b146105135780634ccb20c01461051c5780634cdad5061461041457806351db0d981461052d575f5ffd5b806318160ddd11610357578063313ce56711610327578063313ce5671461049857806338d52e0f146104b25780633af4f8d5146104ec578063402d267d146104ff575f5ffd5b806318160ddd1461044d5780631d6ceea6146104555780631fca71dd1461047d57806323b872dd14610485575f5ffd5b806306fdde031161039257806306fdde03146103ff57806307a2d13a14610414578063095ea7b3146104275780630a28a4771461043a575f5ffd5b80628803d3146103b757806301e1d114146103d45780630408182d146103ea575b5f5ffd5b6103bf61087c565b60405190151581526020015b60405180910390f35b6103dc6108e7565b6040519081526020016103cb565b6103fd6103f8366004612b01565b610920565b005b610407610bec565b6040516103cb9190612b81565b6103dc610422366004612bb6565b610c7c565b6103bf610435366004612bcd565b610c8d565b6103dc610448366004612bb6565b610ca4565b6002546103dc565b610468610463366004612bf7565b610cb0565b604080519283526020830191909152016103cb565b6103dc610d70565b6103bf610493366004612c17565b610d82565b6104a0610da7565b60405160ff90911681526020016103cb565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b6040516001600160a01b0390911681526020016103cb565b6103fd6104fa366004612bb6565b610dd2565b6103dc61050d366004612c55565b505f1990565b6103dc60075481565b6016546001600160a01b03166104d4565b6015546104d4906001600160a01b031681565b600554600160a01b900460ff166103bf565b6103dc610560366004612c70565b610e42565b6103dc610573366004612c55565b6001600160a01b03165f9081526020819052604090205490565b6103fd610e73565b6103dc6105a3366004612c9e565b610e86565b6017546104a090600160a01b900460ff1681565b6005546001600160a01b03166104d4565b6103dc6105db366004612c70565b610f14565b610407610f2f565b6103dc6105f6366004612c55565b610f3e565b6103dc610609366004612c55565b600c6020525f908152604090205481565b600954600a54600b5461062c92919083565b604080519384526020840192909252908201526060016103cb565b6016546104d4906001600160a01b031681565b6103bf610668366004612bcd565b611018565b6103dc61067b366004612c55565b60196020525f908152604090205481565b6103fd61069a366004612bcd565b611025565b6103dc6106ad366004612bb6565b6110c7565b6103fd6110d3565b6103dc6106c8366004612d0f565b6111b0565b6103fd611206565b6103dc6106e3366004612d0f565b61125a565b6103dc60085481565b6103fd6106ff366004612bb6565b6112a7565b6103dc610712366004612c55565b60186020525f908152604090205481565b6103fd610731366004612c55565b611309565b6103dc610744366004612bb6565b611393565b6103fd610757366004612bcd565b61139e565b6103dc61076a366004612c55565b61166f565b6103dc61077d366004612d0f565b611691565b6103dc610790366004612c55565b6116f4565b6103dc6107a3366004612d4e565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6103dc611711565b6104d46107e3366004612bb6565b611874565b6103dc611893565b6103fd6107fe366004612c55565b61193d565b6015546001600160a01b03166104d4565b6103dc610822366004612bb6565b6119c7565b6103fd610835366004612bb6565b611c19565b6103dc60065481565b6103fd610851366004612c55565b611c7a565b6017546104d4906001600160a01b031681565b6103fd610877366004612c55565b611cb7565b6017545f906001600160a01b031633146108a957604051633e31fde960e11b815260040160405180910390fd5b600554600160a01b900460ff16156108c8576108c3611d41565b6108d0565b6108d0611d96565b600554600160a01b900460ff16905090565b905090565b5f5f6108f1611711565b90505f6108fe8242610cb0565b5060095490915061090f8284612d8e565b6109199190612d8e565b9250505090565b610928611dd9565b610930611e06565b6001600160a01b0383165f908152600c60205260409020548015806109c65750306001600160a01b0316846001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610996573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109ba9190612da1565b6001600160a01b031614155b156109e4576040516392439fdf60e01b815260040160405180910390fd5b5f846001600160a01b0316630e80f5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a21573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a459190612dbc565b1115610a645760405163eb51b7ab60e01b815260040160405180910390fd5b6040516383f3bfcb60e01b81526001600160a01b038516906383f3bfcb90610a929086908690600401612dd3565b5f604051808303815f87803b158015610aa9575f5ffd5b505af1158015610abb573d5f5f3e3d5ffd5b505050506001600160a01b0384165f908152600c6020526040812055601754610af090600190600160a01b900460ff16612e01565b6017805460ff92909216600160a01b0260ff60a01b199092169190911790555f5b6008811015610b8757846001600160a01b0316600d8260088110610b3757610b37612e1a565b01546001600160a01b031603610b7f575f600d8260088110610b5b57610b5b612e1a565b0180546001600160a01b0319166001600160a01b0392909216919091179055610b87565b600101610b11565b50610bb37f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2855f611e31565b6040516001600160a01b038516907f09a1db4b80c32706328728508c941a6b954f31eb5affd32f236c1fd405f8fea4905f90a250505050565b606060038054610bfb90612e2e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2790612e2e565b8015610c725780601f10610c4957610100808354040283529160200191610c72565b820191905f5260205f20905b815481529060010190602001808311610c5557829003601f168201915b5050505050905090565b5f610c87825f611ef4565b92915050565b5f33610c9a818585611f2c565b5060019392505050565b5f610c87826001611f3e565b604080516060810182526009548152600a546020820152600b549181018290525f918291908290610ce15784610ce7565b81604001515b90505f818611610cf7575f610d01565b610d018287612d8e565b90505f8115610d645760208401515f818a118015610d1e57505f82115b610d285789610d2a565b815b9050610d3c6127106301e13380612e66565b8460085483610d4b9190612e66565b610d559190612e66565b610d5f9190612e91565b925050505b97909650945050505050565b5f610d79611f6d565b6108e233612005565b5f33610d8f8582856121b4565b610d9a858585612217565b60019150505b9392505050565b5f6108e2817f0000000000000000000000000000000000000000000000000000000000000012612ea4565b610dda611dd9565b6127108110610dfc57604051631411340160e11b815260040160405180910390fd5b610e04611f6d565b600881905560405181815233907f0c48342bc0f7a02c4f23e945a2d4e1483e6eca45bced493692f00a147258d690906020015b60405180910390a250565b5f5f19610e53565b60405180910390fd5b5f610e5d85611393565b9050610e6b33858784612274565b949350505050565b610e7b611dd9565b610e845f612397565b565b6015545f906001600160a01b03163314610eb357604051635c2efcc360e11b815260040160405180910390fd5b5f82610ebd611f6d565b5f5b81811015610f0a57610ef6868683818110610edc57610edc612e1a565b9050602002016020810190610ef19190612c55565b612005565b610f009084612ede565b9250600101610ebf565b5090949350505050565b5f5f195f610f21856110c7565b9050610e6b33858388612274565b606060048054610bfb90612e2e565b5f5f600c5f846001600160a01b03166001600160a01b031681526020019081526020015f205490505f836001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fa3573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fc79190612dbc565b90505f818311610fd7575f610fe1565b610fe18284612d8e565b9050805f03610ff457505f949350505050565b5f610ffd611893565b905080821061100c578061100e565b815b9695505050505050565b5f33610c9a818585612217565b61102d611dd9565b6001600160a01b0382165f908152600c6020526040902054158061104f575080155b1561106d5760405163281a2aa160e11b815260040160405180910390fd5b6001600160a01b0382165f818152600c6020526040908190208390555133907f7b7c670ee8fbb537f7c91290194fce85d4610accb7c4fa4c684b916e0ccc5492906110bb9085815260200190565b60405180910390a35050565b5f610c87826001611ef4565b6015546001600160a01b031633148015906110f957506005546001600160a01b03163314155b156111175760405163f071a75f60e01b815260040160405180910390fd5b61111f611e06565b600980545f81900361112f575050565b5f82556111697f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b6016546001600160a01b0316836123e8565b6016546040518281526001600160a01b03909116907fba0d846635977f8323c35c4fa4b2d1a7e85923e56dc44782bf382d13897e8848906020015b60405180910390a25050565b5f5f6111bb8361166f565b9050808511156111e457828582604051633fa733bb60e21b8152600401610e4a93929190612ebd565b5f6111ee86610ca4565b90506111fd3386868985612419565b95945050505050565b6015546001600160a01b0316331480159061122c57506005546001600160a01b03163314155b1561124a5760405163f071a75f60e01b815260040160405180910390fd5b611252611e06565b610e84611f6d565b5f5f611265836116f4565b90508085111561128e57828582604051632e52afbb60e21b8152600401610e4a93929190612ebd565b5f61129886610c7c565b90506111fd338686848a612419565b6112af611dd9565b6127108111156112d257604051631411340160e11b815260040160405180910390fd5b600681905560405181815233907f14e11a7de0f308b2c2e6649111567aaff8d970b74de005165cd537a67fedf4e690602001610e37565b611311611dd9565b6001600160a01b038116611338576040516358125cd760e11b815260040160405180910390fd5b6017546040516001600160a01b038084169216907f6c5ce163a0b1c1c03aa094d1545f9485a3a78b5161442ca799bf054bf556fdd9905f90a3601780546001600160a01b0319166001600160a01b0392909216919091179055565b5f610c87825f611f3e565b6113a6611dd9565b6113ae611e06565b6001600160a01b038216158061145557507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316826001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611425573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114499190612da1565b6001600160a01b031614155b806114d15750306001600160a01b0316826001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114a1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114c59190612da1565b6001600160a01b031614155b806114f257506001600160a01b0382165f908152600c602052604090205415155b806114fb575080155b15611519576040516368d2008f60e11b815260040160405180910390fd5b6017546008600160a01b90910460ff161061154757604051631e8d9a9760e31b815260040160405180910390fd5b6001600160a01b0382165f908152600c6020526040902081905560175461157990600160a01b900460ff166001612ea4565b6017805460ff92909216600160a01b0260ff60a01b199092169190911790555f5b6008811015611607575f600d82600881106115b7576115b7612e1a565b01546001600160a01b0316036115ff5782600d82600881106115db576115db612e1a565b0180546001600160a01b0319166001600160a01b0392909216919091179055611607565b60010161159a565b506116347f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2835f19611e31565b816001600160a01b03167f2f564a83158ad1831793ad3e69257b52f39ece5d49cb0d8746708ecb9ef964da826040516111a491815260200190565b6001600160a01b0381165f90815260208190526040812054610c87905f611ef4565b5f5f61169d8585610e42565b9050826001600160a01b0316336001600160a01b03167fd0d5f5786af393a6465a13be9c33dbd3ee9c29b1c32872f8aa0cd405ee62f8fe876040516116e491815260200190565b60405180910390a3949350505050565b6001600160a01b0381165f90815260208190526040812054610c87565b5f807f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015611778573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c9190612dbc565b90505f805b6008811015611869575f600d82600881106117be576117be612e1a565b01546001600160a01b03161461186157600d81600881106117e1576117e1612e1a565b015f9054906101000a90046001600160a01b03166001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa158015611830573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118549190612dbc565b61185e9083612ede565b91505b6001016117a1565b506109198183612ede565b600d8160088110611883575f80fd5b01546001600160a01b0316905081565b5f6127106006546118c17f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015611905573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119299190612dbc565b6119339190612e66565b6108e29190612e91565b611945611dd9565b6001600160a01b03811661196c576040516358125cd760e11b815260040160405180910390fd5b6016546040516001600160a01b038084169216907f0bc21fe5c3ab742ff1d15b5c4477ffbacf1167e618228078fa625edebe7f331d905f90a3601680546001600160a01b0319166001600160a01b0392909216919091179055565b5f6119d0611e06565b335f90815260208190526040902054808311156119eb578092505b825f036119f9575090919050565b5f611a0384610c7c565b9050805f03611a255760405163749a32a760e11b815260040160405180910390fd5b5f611a2f826124f5565b91505080611b63575f7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26040516370a0823160e01b81523360048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015611a9d573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ac19190612dbc565b9050611ace86333361125a565b50807f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26040516370a0823160e01b81523360048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015611b35573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b599190612dbc565b61100e9190612d8e565b335f90815260186020526040902054151580611b8c5750335f9081526019602052604090205415155b15611baa57604051635e26357d60e01b815260040160405180910390fd5b611bb5333087612217565b335f818152601860209081526040808320899055601982529182902085905581518881529081018590527f46949ee51143d5b58e4df83122d6c382a04f7bffbe563f78cd7fa61ee519ec08910160405180910390a2509150611c149050565b919050565b611c21611dd9565b6127108110611c4357604051631411340160e11b815260040160405180910390fd5b600781905560405181815233907fb76711dab72aacdc55791d5c5236457539da62d561425943822766e0d5cf675390602001610e37565b611c82611dd9565b6001600160a01b038116611cab57604051631e4fbdf760e01b81525f6004820152602401610e4a565b611cb481612397565b50565b611cbf611dd9565b6001600160a01b038116611ce6576040516358125cd760e11b815260040160405180910390fd5b6015546040516001600160a01b038084169216907f69fc890e2c3697431a600de16e6a5a1faee1abcba6886d2357031464d4c62131905f90a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b611d4961258a565b6005805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611d9e611e06565b6005805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d793390565b6005546001600160a01b03163314610e845760405163118cdaa760e01b8152336004820152602401610e4a565b600554600160a01b900460ff1615610e845760405163d93c066560e01b815260040160405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611e8284826125b4565b611eee576040516001600160a01b0384811660248301525f6044830152611ee491869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506125f9565b611eee84826125f9565b50505050565b5f610da0611f006108e7565b611f0b906001612ede565b611f165f600a612fd4565b600254611f239190612ede565b85919085612665565b611f3983838360016126a7565b505050565b5f610da0611f4d82600a612fd4565b600254611f5a9190612ede565b611f626108e7565b611f23906001612ede565b6009425f611f79611711565b90505f611f868284610cb0565b5090508015611fa75780845f015f828254611fa19190612ede565b90915550505b600184018290556002840183905560085460408051838152602081018590528082018690526060810192909252517fe42c83f2716abb12c6d8cb5ad380eeb47009d410e5e9864205e474045e4508699181900360800190a150505050565b5f61200e611e06565b6001600160a01b0382165f90815260186020526040812054908190036120345792915050565b6001600160a01b0383165f908152601960205260408120549061205683610c7c565b90505f8183116120665782612068565b815b9050805f0361208a5760405163749a32a760e11b815260040160405180910390fd5b5f612094826124f5565b509050808211156120b85760405163be386bdd60e01b815260040160405180910390fd5b6001600160a01b0387165f90815260186020908152604080832083905560199091528120556120e73086612779565b60408051868152602081018490526001600160a01b038916917f1982e7c721ba61a9e67e8d0468ff2b794f4bf3a46c8cef6c9b8aa2127cbbbb08910160405180910390a260408051838152602081018790526001600160a01b03891691829133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a461217d82886127b1565b91506121aa7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc288846123e8565b5095945050505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811015611eee578181101561220957828183604051637dc7a0d960e11b8152600401610e4a93929190612ebd565b611eee84848484035f6126a7565b6001600160a01b03831661224057604051634b637e8f60e11b81525f6004820152602401610e4a565b6001600160a01b0382166122695760405163ec442f0560e01b81525f6004820152602401610e4a565b611f39838383612864565b61227c611e06565b805f0361229c57604051636c9c13a360e11b815260040160405180910390fd5b5f6122a660025490565b905080156122b6576122b6611f6d565b6122e27f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2863086612977565b805f0361233057620f4240821161230c5760405163020ac01360e31b815260040160405180910390fd5b61231930620f42406129b0565b612326620f424083612d8e565b9150612330611f6d565b61233a84836129b0565b836001600160a01b0316856001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78585604051612388929190918252602082015260400190565b60405180910390a35050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040516001600160a01b03838116602483015260448201839052611f3991859182169063a9059cbb90606401611eb2565b612421611e06565b612429611f6d565b826001600160a01b0316856001600160a01b03161461244d5761244d8386836121b4565b6124578382612779565b61246182846127b1565b915061248e7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc285846123e8565b826001600160a01b0316846001600160a01b0316866001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db85856040516124e6929190918252602082015260400190565b60405180910390a45050505050565b5f807f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa15801561255c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125809190612dbc565b9392841092915050565b600554600160a01b900460ff16610e8457604051638dfc202b60e01b815260040160405180910390fd5b5f5f5f5f60205f8651602088015f8a5af192503d91505f51905082801561100e575081156125e5578060011461100e565b50505050506001600160a01b03163b151590565b5f5f60205f8451602086015f885af180612618576040513d5f823e3d81fd5b50505f513d9150811561262f57806001141561263c565b6001600160a01b0384163b155b15611eee57604051635274afe760e01b81526001600160a01b0385166004820152602401610e4a565b5f612692612672836129e4565b801561268d57505f848061268857612688612e7d565b868809115b151590565b61269d868686612a10565b6111fd9190612ede565b6001600160a01b0384166126d05760405163e602df0560e01b81525f6004820152602401610e4a565b6001600160a01b0383166126f957604051634a1406b160e11b81525f6004820152602401610e4a565b6001600160a01b038085165f9081526001602090815260408083209387168352929052208290558015611eee57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161276b91815260200190565b60405180910390a350505050565b6001600160a01b0382166127a257604051634b637e8f60e11b81525f6004820152602401610e4a565b6127ad825f83612864565b5050565b6007545f90839015610da0575f612710600754866127cf9190612e66565b6127d99190612e91565b90506127e58186612d8e565b9150801561285c576128167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2611157565b6016546040518281526001600160a01b03918216918616907f98c9cba9662004728744ffdcf87b0b68b835b8f51b6d986f7acb7198c1d2a8059060200160405180910390a35b509392505050565b6001600160a01b03831661288e578060025f8282546128839190612ede565b909155506128eb9050565b6001600160a01b0383165f90815260208190526040902054818110156128cd5783818360405163391434e360e21b8152600401610e4a93929190612ebd565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661290757600280548290039055612925565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161296a91815260200190565b60405180910390a3505050565b6040516001600160a01b038481166024830152838116604483015260648201839052611eee9186918216906323b872dd90608401611eb2565b6001600160a01b0382166129d95760405163ec442f0560e01b81525f6004820152602401610e4a565b6127ad5f8383612864565b5f60028260038111156129f9576129f9612fe2565b612a039190612ff6565b60ff166001149050919050565b5f5f5f612a1d8686612ac0565b91509150815f03612a4157838181612a3757612a37612e7d565b0492505050610da0565b818411612a5857612a586003851502601118612adc565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b6001600160a01b0381168114611cb4575f5ffd5b5f5f5f60408486031215612b13575f5ffd5b8335612b1e81612aed565b9250602084013567ffffffffffffffff811115612b39575f5ffd5b8401601f81018613612b49575f5ffd5b803567ffffffffffffffff811115612b5f575f5ffd5b866020828401011115612b70575f5ffd5b939660209190910195509293505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f60208284031215612bc6575f5ffd5b5035919050565b5f5f60408385031215612bde575f5ffd5b8235612be981612aed565b946020939093013593505050565b5f5f60408385031215612c08575f5ffd5b50508035926020909101359150565b5f5f5f60608486031215612c29575f5ffd5b8335612c3481612aed565b92506020840135612c4481612aed565b929592945050506040919091013590565b5f60208284031215612c65575f5ffd5b8135610da081612aed565b5f5f60408385031215612c81575f5ffd5b823591506020830135612c9381612aed565b809150509250929050565b5f5f60208385031215612caf575f5ffd5b823567ffffffffffffffff811115612cc5575f5ffd5b8301601f81018513612cd5575f5ffd5b803567ffffffffffffffff811115612ceb575f5ffd5b8560208260051b8401011115612cff575f5ffd5b6020919091019590945092505050565b5f5f5f60608486031215612d21575f5ffd5b833592506020840135612d3381612aed565b91506040840135612d4381612aed565b809150509250925092565b5f5f60408385031215612d5f575f5ffd5b8235612d6a81612aed565b91506020830135612c9381612aed565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610c8757610c87612d7a565b5f60208284031215612db1575f5ffd5b8151610da081612aed565b5f60208284031215612dcc575f5ffd5b5051919050565b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b60ff8281168282160390811115610c8757610c87612d7a565b634e487b7160e01b5f52603260045260245ffd5b600181811c90821680612e4257607f821691505b602082108103612e6057634e487b7160e01b5f52602260045260245ffd5b50919050565b8082028115828204841417610c8757610c87612d7a565b634e487b7160e01b5f52601260045260245ffd5b5f82612e9f57612e9f612e7d565b500490565b60ff8181168382160190811115610c8757610c87612d7a565b6001600160a01b039390931683526020830191909152604082015260600190565b80820180821115610c8757610c87612d7a565b6001815b6001841115612f2c57808504811115612f1057612f10612d7a565b6001841615612f1e57908102905b60019390931c928002612ef5565b935093915050565b5f82612f4257506001610c87565b81612f4e57505f610c87565b8160018114612f645760028114612f6e57612f8a565b6001915050610c87565b60ff841115612f7f57612f7f612d7a565b50506001821b610c87565b5060208310610133831016604e8410600b8410161715612fad575081810a610c87565b612fb95f198484612ef1565b805f1904821115612fcc57612fcc612d7a565b029392505050565b5f610da060ff841683612f34565b634e487b7160e01b5f52602160045260245ffd5b5f60ff83168061300857613008612e7d565b8060ff8416069150509291505056fea2646970667358221220a0522dd99d79a80b0c06ff8ea34d98413de318318bed3063ea05ebae04ed0abb64736f6c634300081d0033

Verified Source Code Partial Match

Compiler: v0.8.29+commit.ab55807c EVM: cancun Optimization: Yes (200 runs)
SparkleXVault.sol 4245 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.29 ^0.8.20;

// src/utils/Constants.sol

library Constants {
    /**
     * @dev used as base unit for most ERC20 token.
     */
    uint256 constant ONE_ETHER = 1e18;

    /**
     * @dev used as base unit for GWEI.
     */
    uint256 constant ONE_GWEI = 1e9;

    /**
     * @dev used as ratio denominator.
     */
    uint256 constant TOTAL_BPS = 10000;

    /**
     * @dev used as denominator for annual calculation.
     */
    uint256 constant ONE_YEAR = 365 days;

    /**
     * @dev used as dummy dead address.
     */
    address constant ZRO_ADDR = address(0);

    function convertDecimalToUnit(uint256 decimal) public pure returns (uint256) {
        if (decimal == 18) {
            return ONE_ETHER;
        } else if (decimal == 9) {
            return ONE_GWEI;
        } else if (decimal > 0) {
            return 10 ** decimal;
        } else {
            return 0;
        }
    }

    // errors in vault & common to strategies
    error STRATEGY_COLLECTION_IN_PROCESS();
    error SWAP_OUT_TOO_SMALL();
    error INVALID_BPS_TO_SET();
    error WRONG_STRATEGY_TO_ADD();
    error WRONG_STRATEGY_TO_REMOVE();
    error WRONG_STRATEGY_ALLOC_UPDATE();
    error ZERO_SHARE_TO_MINT();
    error TOO_SMALL_FIRST_SHARE();
    error WRONG_PRICE_FROM_ORACLE();
    error INVALID_ADDRESS_TO_SET();
    error ONLY_FOR_CLAIMER();
    error ONLY_FOR_CLAIMER_OR_OWNER();
    error ONLY_FOR_STRATEGIST();
    error ONLY_FOR_STRATEGIST_OR_VAULT();
    error ZERO_ASSET_TO_USER();
    error USER_REDEMPTION_NOT_CLAIMED();
    error LESS_REDEMPTION_TO_USER();
    error WRONG_SWAP_RECEIVER();
    error ONLY_FOR_STRATEGIST_OR_OWNER();
    error TOO_MANY_STRATEGIES();
    error INVALID_HELPER_CALLER();
    error ONLY_FOR_PAUSE_COMMANDER();
    error VAULT_ALREADY_PAUSED();
    error INVALID_TOKEN_INDEX_IN_CURVE();
    error ONLY_FOR_WHITELISTED_CALLER();

    // errors in AAVE related strategy
    error FAIL_TO_REPAY_FLASHLOAN_LEVERAGE();
    error FAIL_TO_REPAY_FLASHLOAN_DELEVERAGE();
    error WRONG_AAVE_FLASHLOAN_CALLER();
    error WRONG_AAVE_FLASHLOAN_INITIATOR();
    error WRONG_AAVE_FLASHLOAN_ASSET();
    error WRONG_AAVE_FLASHLOAN_PREMIUM();
    error WRONG_AAVE_FLASHLOAN_AMOUNT();
    error ZERO_SUPPLY_FOR_AAVE_LEVERAGE();
    error FAIL_TO_SAFE_LEVERAGE();
    error TOO_MUCH_SUPPLY_TO_REDEEM();
    error TOO_MUCH_TO_BORROW();
    error DIFFERENT_TOKEN_IN_AAVE_HELPER();
    error POSITION_STILL_IN_USE();
    error ONLY_FOR_STRATEGIST_OR_OWNER_OR_FL();

    // errors in EtherFi related strategy
    error TOO_MANY_WITHDRAW_FOR_ETHERFI();

    // errors in Pendle related strategy
    error INVALID_MARKET_TO_ADD();
    error PT_NOT_FOUND();
    error PT_ALREADY_EXISTS();
    error PT_NOT_MATURED();
    error PT_ALREADY_MATURED();
    error INVALID_SWAP_CALLDATA();
    error MAX_PT_EXCEEDED();
    error PT_STILL_IN_USE();
    error ZERO_TO_SWAP_IN_PENDLE();
    error PT_NOT_MATCH_MARKET();
}

// lib/openzeppelin-contracts/contracts/utils/Context.sol

// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// interfaces/IStrategy.sol

interface IStrategy {
    /**
     * @dev Returns the address of the underlying token used by the strategy, should be same as Vault's.
     */
    function asset() external view returns (address assetTokenAddress);

    /**
     * @dev Returns the address of associated Vault.
     */
    function vault() external view returns (address vaultAddress);

    /**
     * @dev Returns the total amount of the underlying asset (plus earnings or loss) that is managed by this strategy.
     */
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /**
     * @dev Returns the total amount of the underlying asset (plus earnings or loss) that is in the process of collection.
     */
    function assetsInCollection() external view returns (uint256 inCollectionAssets);

    /**
     * @dev make investment of underlying asset with given amount from Vault into this strategy
     * @param _extraAction extra bytes data, which is used for any followup action required.
     */
    function allocate(uint256 amount, bytes calldata _extraAction) external;

    /**
     * @dev recycle investment with given amount from this strategy back to Vault
     * @param _extraAction extra bytes data, which is used for any followup action required.
     */
    function collect(uint256 amount, bytes calldata _extraAction) external;

    /**
     * @dev recycle all remaining investment from this strategy back to Vault
     * @param _extraAction extra bytes data, which is used for any followup action required.
     */
    function collectAll(bytes calldata _extraAction) external;

    /**
     * @dev Returns the address of the strategist who could handle some critical missions for this strategy.
     */
    function strategist() external view returns (address strategist);

    /**
     * @dev issue this event when investment allocation triggered by strategist.
     */
    event AllocateInvestment(address indexed _strategist, uint256 _allocationAmount);

    /**
     * @dev issue this event when investment collection triggered by strategist or vault.
     */
    event CollectInvestment(address indexed _caller, uint256 _collectionAmount);
}

// lib/openzeppelin-contracts/contracts/utils/Panic.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)

/**
 * @dev Helper library for emitting standardized panic codes.
 *
 * ```solidity
 * contract Example {
 *      using Panic for uint256;
 *
 *      // Use any of the declared internal constants
 *      function foo() { Panic.GENERIC.panic(); }
 *
 *      // Alternatively
 *      function foo() { Panic.panic(Panic.GENERIC); }
 * }
 * ```
 *
 * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
 *
 * _Available since v5.1._
 */
// slither-disable-next-line unused-state
library Panic {
    /// @dev generic / unspecified error
    uint256 internal constant GENERIC = 0x00;
    /// @dev used by the assert() builtin
    uint256 internal constant ASSERT = 0x01;
    /// @dev arithmetic underflow or overflow
    uint256 internal constant UNDER_OVERFLOW = 0x11;
    /// @dev division or modulo by zero
    uint256 internal constant DIVISION_BY_ZERO = 0x12;
    /// @dev enum conversion error
    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;
    /// @dev invalid encoding in storage
    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;
    /// @dev empty array pop
    uint256 internal constant EMPTY_ARRAY_POP = 0x31;
    /// @dev array out of bounds access
    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
    /// @dev resource error (too large allocation or too large array)
    uint256 internal constant RESOURCE_ERROR = 0x41;
    /// @dev calling invalid internal function
    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;

    /// @dev Reverts with a panic code. Recommended to use with
    /// the internal constants with predefined codes.
    function panic(uint256 code) internal pure {
        assembly ("memory-safe") {
            mstore(0x00, 0x4e487b71)
            mstore(0x20, code)
            revert(0x1c, 0x24)
        }
    }
}

// lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

/**
 * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeCast {
    /**
     * @dev Value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);

    /**
     * @dev An int value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedIntToUint(int256 value);

    /**
     * @dev Value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);

    /**
     * @dev An uint value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedUintToInt(uint256 value);

    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        if (value > type(uint248).max) {
            revert SafeCastOverflowedUintDowncast(248, value);
        }
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        if (value > type(uint240).max) {
            revert SafeCastOverflowedUintDowncast(240, value);
        }
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        if (value > type(uint232).max) {
            revert SafeCastOverflowedUintDowncast(232, value);
        }
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        if (value > type(uint224).max) {
            revert SafeCastOverflowedUintDowncast(224, value);
        }
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        if (value > type(uint216).max) {
            revert SafeCastOverflowedUintDowncast(216, value);
        }
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        if (value > type(uint208).max) {
            revert SafeCastOverflowedUintDowncast(208, value);
        }
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        if (value > type(uint200).max) {
            revert SafeCastOverflowedUintDowncast(200, value);
        }
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        if (value > type(uint192).max) {
            revert SafeCastOverflowedUintDowncast(192, value);
        }
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        if (value > type(uint184).max) {
            revert SafeCastOverflowedUintDowncast(184, value);
        }
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        if (value > type(uint176).max) {
            revert SafeCastOverflowedUintDowncast(176, value);
        }
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        if (value > type(uint168).max) {
            revert SafeCastOverflowedUintDowncast(168, value);
        }
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        if (value > type(uint160).max) {
            revert SafeCastOverflowedUintDowncast(160, value);
        }
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        if (value > type(uint152).max) {
            revert SafeCastOverflowedUintDowncast(152, value);
        }
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        if (value > type(uint144).max) {
            revert SafeCastOverflowedUintDowncast(144, value);
        }
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        if (value > type(uint136).max) {
            revert SafeCastOverflowedUintDowncast(136, value);
        }
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        if (value > type(uint128).max) {
            revert SafeCastOverflowedUintDowncast(128, value);
        }
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        if (value > type(uint120).max) {
            revert SafeCastOverflowedUintDowncast(120, value);
        }
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        if (value > type(uint112).max) {
            revert SafeCastOverflowedUintDowncast(112, value);
        }
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        if (value > type(uint104).max) {
            revert SafeCastOverflowedUintDowncast(104, value);
        }
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        if (value > type(uint96).max) {
            revert SafeCastOverflowedUintDowncast(96, value);
        }
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        if (value > type(uint88).max) {
            revert SafeCastOverflowedUintDowncast(88, value);
        }
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        if (value > type(uint80).max) {
            revert SafeCastOverflowedUintDowncast(80, value);
        }
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        if (value > type(uint72).max) {
            revert SafeCastOverflowedUintDowncast(72, value);
        }
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        if (value > type(uint64).max) {
            revert SafeCastOverflowedUintDowncast(64, value);
        }
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        if (value > type(uint56).max) {
            revert SafeCastOverflowedUintDowncast(56, value);
        }
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        if (value > type(uint48).max) {
            revert SafeCastOverflowedUintDowncast(48, value);
        }
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        if (value > type(uint40).max) {
            revert SafeCastOverflowedUintDowncast(40, value);
        }
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        if (value > type(uint32).max) {
            revert SafeCastOverflowedUintDowncast(32, value);
        }
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        if (value > type(uint24).max) {
            revert SafeCastOverflowedUintDowncast(24, value);
        }
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        if (value > type(uint16).max) {
            revert SafeCastOverflowedUintDowncast(16, value);
        }
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        if (value > type(uint8).max) {
            revert SafeCastOverflowedUintDowncast(8, value);
        }
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        if (value < 0) {
            revert SafeCastOverflowedIntToUint(value);
        }
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(248, value);
        }
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(240, value);
        }
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(232, value);
        }
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(224, value);
        }
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(216, value);
        }
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(208, value);
        }
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(200, value);
        }
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(192, value);
        }
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(184, value);
        }
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(176, value);
        }
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(168, value);
        }
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(160, value);
        }
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(152, value);
        }
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(144, value);
        }
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(136, value);
        }
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(128, value);
        }
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(120, value);
        }
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(112, value);
        }
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(104, value);
        }
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(96, value);
        }
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(88, value);
        }
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(80, value);
        }
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(72, value);
        }
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(64, value);
        }
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(56, value);
        }
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(48, value);
        }
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(40, value);
        }
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(32, value);
        }
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(24, value);
        }
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(16, value);
        }
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(8, value);
        }
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        if (value > uint256(type(int256).max)) {
            revert SafeCastOverflowedUintToInt(value);
        }
        return int256(value);
    }

    /**
     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
     */
    function toUint(bool b) internal pure returns (uint256 u) {
        assembly ("memory-safe") {
            u := iszero(iszero(b))
        }
    }
}

// lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol

// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approve...

// [truncated — 163098 bytes total]

Read Contract

EARN_RATIO_BPS 0xf0628580 → uint256
MANAGEMENT_FEE_BPS 0xbcf90d2b → uint256
WITHDRAW_FEE_BPS 0x4082fa9b → uint256
_feeRecipient 0xa342f238 → address
_pauseCommander 0xf43f7832 → address
_rawTotalAssets 0xe0a51374 → uint256
_redemptionClaimer 0x51db0d98 → address
activeStrategies 0x821a622f → uint8
allStrategies 0xe1e3dfeb → address
allowance 0xdd62ed3e → uint256
asset 0x38d52e0f → address
balanceOf 0x70a08231 → uint256
convertToAssets 0x07a2d13a → uint256
convertToShares 0xc6e6f592 → uint256
decimals 0x313ce567 → uint8
getAllocationAvailable 0xe2c9acc1 → uint256
getAllocationAvailableForStrategy 0x99170060 → uint256
getFeeRecipient 0x4ccb20c0 → address
getRedemptionClaimer 0xedd9f83a → address
maxDeposit 0x402d267d → uint256
maxMint 0xc63d75b6 → uint256
maxRedeem 0xd905777e → uint256
maxWithdraw 0xce96cb77 → uint256
mgmtFee 0x9be9afa8 → uint256, uint256, uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
previewDeposit 0xef8b30f7 → uint256
previewManagementFeeAccumulated 0x1d6ceea6 → uint256, uint256
previewMint 0xb3d7f6b9 → uint256
previewRedeem 0x4cdad506 → uint256
previewWithdraw 0x0a28a477 → uint256
strategyAllocations 0x9acf5d34 → uint256
symbol 0x95d89b41 → string
totalAssets 0x01e1d114 → uint256
totalSupply 0x18160ddd → uint256
userRedemptionRequestAssets 0xaad4203a → uint256
userRedemptionRequestShares 0xc5c9e477 → uint256

Write Contract 25 functions

These functions modify contract state and require a wallet transaction to execute.

accumulateManagementFee 0xb9770397
No parameters
addStrategy 0xc9411e22
address _strategyAddr
uint256 _allocation
approve 0x095ea7b3
address spender
uint256 value
returns: bool
batchClaimRedemptionRequestsFor 0x772fbebf
address[] _users
returns: uint256
claimManagementFee 0xb44f9b48
No parameters
claimRedemptionRequest 0x1fca71dd
No parameters
returns: uint256
deposit 0x6e553f65
uint256 assets
address receiver
returns: uint256
depositWithReferral 0xd48fbb95
uint256 assets
address receiver
address referralCode
returns: uint256
mint 0x94bf804d
uint256 shares
address receiver
returns: uint256
redeem 0xba087652
uint256 shares
address receiver
address owner
returns: uint256
removeStrategy 0x0408182d
address _strategyAddr
bytes _extraAction
renounceOwnership 0x715018a6
No parameters
requestRedemption 0xeeb3c910
uint256 shares
returns: uint256
setEarnRatio 0xbe670a46
uint256 _ratio
setFeeRecipient 0xe74b981b
address _newRecipient
setManagementFeeRatio 0x3af4f8d5
uint256 _ratio
setPauseCommander 0xc64d9d86
address _newPauseCommander
setRedemptionClaimer 0xf6527dc9
address _newClaimer
setWithdrawFeeRatio 0xf0119bc8
uint256 _ratio
togglePauseState 0x008803d3
No parameters
returns: bool
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateStrategyAllocation 0xb1fb09f9
address _strategy
uint256 _newAlloc
withdraw 0xb460af94
uint256 assets
address receiver
address owner
returns: uint256

Recent Transactions

No transactions found for this address