Address Contract Partially Verified
Address
0x5418226aF9C8d5D287A78FbBbCD337b86ec07D61
Balance
0 ETH
Nonce
1
Code Size
20363 bytes
Creator
0xa068B4CC...32DB at tx 0x5fcf766b...eeede6
Indexed Transactions
0
Contract Bytecode
20363 bytes
0x60808060405260043610156111ff575b5036156111fd573461021a57610023613c55565b906f07f49fa1cdccd5c65a7d4860ce3abbe991825c9283331860601b845f351860e01c1761021a575f905d8060041161021a576003196004830191019260a01c61ffff169081600414610daf5781600114610d1857816003146107fc578160061461021e578160021461014357506005146100ac57634e487b7160e01b5f52605160045260245ffd5b6024810190604481013580936060105f146101305750610106916100e6604051916100d683611530565b3383528560208401523690611663565b9061010060a484013593369060e460c4820135910161160f565b916142ed565b6040519060608252602082810152602082604001528160600152806080016040525b602081519101f35b905061013e91339035613bd0565b610106565b9192608091501061021a57356044820135820190602482013560601c925f82135f1461020e5750905b30830361019a57610186925060383391013560601c613bd0565b604051610192816115b4565b5f8152610128565b906101a8610209931561429c565b604051906101b582611530565b33825260208201526101ca36602c8401611663565b90610100608d84013560011693369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161160f565b610186565b6024915001359061016c565b5f80fd5b505061029b9150806044602461028d9301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9586939197989495986147bc565b968560409b939694959b97929701518a8989898988306001600160a01b038716036107ec575b6107ce575b50505050505184606001526102da84614aab565b906102e36144d2565b918b6102ed61443c565b915b602084101561058c5750505050508160400151968760200151975199610316845182614ef5565b836020015180511561057c575b5080519081158015610501575b50505082519a8b602001519b519b828d9384106104fa5750906103539291614cc2565b156104455750505050508215918215610392575b505050505b604051906060825260208281015260208260400152816060015280608001604052610128565b6001600160a01b0316300361042d5730905b60601b9161041057604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af115610408575f6060526040525f808080610367565b3d5f823e3d90fd5b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6fc824a45acd1e9517bb0cb8d0d5cde8935c906103a4565b6060969294969591939501519680880397146104de576001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036104cd575050505050505f6014526fa58411940000000000000000000000005f525f806024601082335af1156104c2575f6004601c6020936311da60b48452335af161036c575b6040513d5f823e3d90fd5b906104d89691614db2565b5061036c565b6014526ffb772a880000000000000000000000005f5260246010fd5b9150613bad565b61056857602081015185604001518103610547575b5060015b82811015610330578061054160208460019460051b01015180602001519051903090614cc2565b0161051a565b602081015190516105629130906001600160a01b0316614cc2565b5f610516565b634e487b7160e01b5f52603260045260245ffd5b6105869082614ef5565b5f610323565b803560f01c9360011901906002016105a49288614ac8565b866020949294015160200151875160200151948160601b928660601b9273777777777777777777777777777777777777777760611b976001600160a01b0316906001600160a01b031690848610858a141516868a1417828218028092186001600160a01b031660208b0152186001600160a01b03168852813560e81c6040890152813560d01c62ffffff1660020b6060890152813560301c6001600160a01b031660808901527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60190601a019061068e9091803560e81c6002198160038185820195010195030192565b90919792958862ffffff106107bc576020916127105f928e888a1089891415168a89141715158c528501515102048203838a01526001600160a01b0386881087871415168887141773fffd8963efd1fc6a506488495d951d53639afb810273fffd8963efd1fc6a506488495d951d5263988d25181660408a0152806040519463f3cd914c86528c518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028686015260808d8601876040015e60608b8760c0015e61012086810152818661014001528561016001376101440183601c0182335af11561040857505f5192600f84810b9460801d900b92808210908314151691141781831802916107a089602001519184835191185f0390613c48565b90526107b28851809381519318614be9565b0190528c906102ef565b634e487b715f5260326020526024601cfd5b6107e094866020015190875191614db2565b81528a898989896102c6565b6107f582614936565b87526102c1565b5050505061086a61028d61080e613c55565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b968560409b939694959b97929701518a8989898988306001600160a01b03871603610d08575b610cea575b50505050505184606001526108a984614aab565b906108b26144d2565b91604051906108c082611560565b5f82525f60208301525f60408301525f60608301525f60808301525f60a0830152606060c08301525b6003831015610ac85750505050816040015196876020015197519961090f845182614ef5565b8360200151805115610ab8575b5080519081158015610a51575b50505082519a8b602001519b519b828d9384106104fa57509061094c9291614c63565b15610a0c575050505050821591821561097e575b505050505b6040519060208252816020015280604001604052610128565b6001600160a01b031630036109f45730905b60601b9161041057604051926060526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af115610408575f6060526040525f808080610960565b6fc824a45acd1e9517bb0cb8d0d5cde8935c90610990565b606098979896919395929496015197808914610a3457610a2e97980391614d21565b50610965565b826014526ffb772a880000000000000000000000005f5260246010fd5b61056857602081015185604001518103610a97575b5060015b828110156109295780610a9160208460019460051b01015180602001519051903090614c63565b01610a6a565b60208101519051610ab29130906001600160a01b0316614c63565b5f610a66565b610ac29082614ef5565b5f61091c565b808d600119610ae2933560f01c9501916002019088614ac8565b92838261c0008316610c2757505081612710610b6492610b70943560601c86602001526001600160a01b038a60200151602001511660408701526001600160a01b038a516020015116606087015289602001515102046080850152601319604051950190601401919091803560e81c6002198160038185820195010195030192565b9592939195369161160f565b60c084015262ffffff84116107bc57604051603f1984015190601f1985015190632bfb780c603f198701526020601f1987015260605f60448860c00151898151910390818b60c0015201017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc890182335af115610408576020519160405193603f19880152601f198701526040528860200151908151039052610c168851918251613c82565b905260608360c001526040526108e9565b92509362ffffff106107bc57613fff816140006127109316155f14610cc7575f60208801526001600160a01b038951602001511660408801525b1687602001515102046060850152604051601f19850151906343583be5601f1987015260605f60a4600319890182335af115610408576020519060405192601f198801526040528760200151908151039052610cc08751918251613c82565b90526108e9565b600160208801526001600160a01b03896020015160200151166040880152610c61565b610cfc94866020015190875191614d21565b81528a89898989610895565b610d1182614936565b8752610890565b9260a091501061021a5761018691610d4a60a48301916001600160a01b0380610d40856144be565b169135161461429c565b610d6e60405191610d5a83611530565b338352602484013560208401523690611663565b906101006101058401356001169336906101257fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f608483013501910161160f565b5050610e1e9150806064604461028d9301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b968560409b939694959b97929701518a8989898988306001600160a01b038716036111ed575b6111cf575b50505050508051607f1c6111bd57518460600152610e6684614aab565b610e6e61443c565b915b6023811015611036575050508160400151968760200151975199610e95845182614ef5565b8360200151805115611026575b5080519081158015610fbf575b50505082519a8b602001519b519b828d9384106104fa575090610ed29291614c04565b15610f9d5750505050508215918215610f0f5750505050604051906060825260208281015260208260400152816060015280608001604052610128565b6001600160a01b03163003610f855730905b60601b9161041057604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af115610408575f6060526040525f808080610367565b6fc824a45acd1e9517bb0cb8d0d5cde8935c90610f21565b606098979896919395929496015197808914610a34576104d897980391614982565b61056857602081015185604001518103611005575b5060015b82811015610eaf5780610fff60208460019460051b01015180602001519051903090614c04565b01610fd8565b602081015190516110209130906001600160a01b0316614c04565b5f610fd4565b6110309082614ef5565b5f610ea2565b6001196110499101826002018d87614ac8565b916127108660200151913560f01c82510204906020015190865160200151918060601b916001600160a01b038460601b94818073777777777777777777777777777777777777777760611b951691169082868810878714151688871417838318028093181660208b015218168752601f198560200196019435604088015262ffffff85116107bc57604051905f825281602001606089825e805173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee811415029052608082015281841482841415848610161760a0820181905267400065a8177fae276bffff9a58c9f7f0ae8d3e0684909102186bffffffffffffffffffffffff1660c08201525f60e0820181905260409060e4601c840182335af1156104085750611195905f5193602051938082109083141516911417828418028092189261118f8960200151809481519318614be9565b90613c48565b90528551908151905f81136111ae575f03019052610e70565b602483633351b2608152601c01fd5b634e487b715f5260116020526024601cfd5b6111e194866020015190875191614982565b81528a89898989610e49565b6111f682614936565b8752610e44565b005b5f3560e01c9081631fff991f146112855750806367c4a3b014611257576370a082311461122c575f61000f565b3461021a57602060031936011261021a576004356001600160a01b0381160361021a575f805360015ff35b3461021a575f60031936011261021a57602060405173352650ac2653508d946c4912b07895b22edd84cd8152f35b600319360160a0811261021a5760601361021a5767ffffffffffffffff806064351161021a5736602360643501121561021a57606435600401351161021a573660246064356004013560051b60643501011161021a57336d1ff3684f28c67538d4d072c227343314611500575b6001600160a01b038116156114f3576fc824a45acd1e9517bb0cb8d0d5cde89391825c6001600160a01b0381166114d75750816001600160a01b0316835d60643560040135611428575b506001805b60643560040135811061138c57836001600160a01b0384611360611c74565b166001600160a01b03825c160361137f575f905d602060405160018152f35b635149e7955f526004601cfd5b60246064358260051b0101356064350160248101359060448101359160486003198201920191604051936113c482858360e01c61234f565b85604052156113d95750505050508101611341565b7fffffffff000000000000000000000000000000000000000000000000000000009086633c74eed68752866020015216846040015260608481015260809281858501528460a001370190601c01fd5b602460643501356064350160248101359060448101358060e01c906048600319850193019161145884848361173f565b866040521561146c575b505050505061133c565b83836114779261234f565b85604052156114865780611462565b8495507fffffffff0000000000000000000000000000000000000000000000000000000090633c74eed6608096525f876020015216856040015260608581015281858501528460a001370190601c01fd5b6014526f7407c0f80000000000000000000000005f5260246010fd5b63e758b8d55f526004601cfd5b5060131936013560601c6112f2565b35906001600160a01b038216820361021a57565b3590811515820361021a57565b6040810190811067ffffffffffffffff82111761154c57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761154c57604052565b6060810190811067ffffffffffffffff82111761154c57604052565b6080810190811067ffffffffffffffff82111761154c57604052565b6020810190811067ffffffffffffffff82111761154c57604052565b90601f601f19910116810190811067ffffffffffffffff82111761154c57604052565b67ffffffffffffffff811161154c57601f01601f191660200190565b92919261161b826115f3565b9161162960405193846115d0565b82948184528183011161021a578281602093845f960137010152565b9080601f8301121561021a578160206116609335910161160f565b90565b80929103916080831261021a576040519061167d8261157c565b604082941261021a576060604091825161169681611530565b61169f8261150f565b81526020820135602082015284528281013560208501520135910152565b916101608383031261021a576116d28361150f565b926116df60208201611523565b9260408201359260608301359267ffffffffffffffff91608082013583811161021a578461170e918401611645565b9361171c8160a08501611663565b9361012084013590811161021a5761014091611739918501611645565b92013590565b61174a838383611d12565b1561175757505050600190565b63e15b26bc81036117aa5750611776816117a39361179e9301906116bd565b96956001600160a01b036d1ff3684f28c67538d4d072c2273496929695939533149716613cd3565b613f21565b505b600190565b638de80c1c8103611805575063ffffffff6117ce826117a3946117fa9401906116bd565b95946d1ff3684f28c67538d4d072c227349997999491949392933314956001600160a01b038b16613cd3565b9160801c1690613e9c565b63c3608b9d8103611b2757509081016101208282031261021a576118288261150f565b906020604091611839838601611523565b946118478260608301611663565b9460e082013567ffffffffffffffff811161021a5760559361186a918401611645565b916101008101359661199361191d6001600160a01b039687947fbb7b783eb4b8ca46925c5384a6b9919df57cb83da8f76e37291f58d0dd5c439a60e18c730a7e848aca42d879ef06507fca0e7b33a0a63c1e8d82519c8d91848c518483015e848c8201846060015e6d1ff3684f28c67538d4d072c2273433148360a001538151918291018360a1015e806081018252019160a18301809152528c60ac82019460ff8653013560c18201520152209261403c565b8a15611b1c57637fffffff5b89519161193583611598565b82528b1515898301525f8a83015260030b60608201526119858951968792868b8501987f3eece7db000000000000000000000000000000000000000000000000000000008a52166024850161226b565b03601f1981018652856115d0565b16926fc824a45acd1e9517bb0cb8d0d5cde8935c1683146114f3576f07f49fa1cdccd5c65a7d4860ce3abbe991825c80611b0d57505f9182917f67ca7c91000000000000000100000000000000000000000000000000000000008617855d519082865af190611a006140b2565b9115611b05575c80611af65750808380611a1f935183010191016122b5565b959050848610611a3457505050505050600190565b60049291829115611ab6578451938480927f5f64b55b0000000000000000000000000000000000000000000000000000000082525afa928315611aad57505f92611a80575b5050613bad565b611a9f9250803d10611aa6575b611a9781836115d0565b8101906122cb565b8380611a79565b503d611a8d565b513d5f823e3d90fd5b8451938480927f0fc63d100000000000000000000000000000000000000000000000000000000082525afa928315611aad57505f92611a80575050613bad565b8363d66fcc385f52526024601cfd5b508281519101fd5b8563ab7646c45f52526024601cfd5b637fffffff19611929565b63b840fd0e03611c6e57611b3d918101906116bd565b6f7fffffffffffffffffffffffffffffff81989294959897969397116111bd5782606081020460601483151715611c5a5787606081020460601488151715611c5a576fffffffffffffffffffffffffffffffff8060608502116111bd5760608902116111bd5760606001600160a01b0393816117a39a604080519b8a51998d81519c8d928d6101329285610115868401820101526020018484015e602001918d01015e6101358d8b018c010182526d1ff3684f28c67538d4d072c2273433148d6101310153816020820160f18f015e518c60b1015e5f8b609d01520289608801520287607801528660680152168460580152018060d10183604401526020836024015263f83d08ba83600401526101150182528160a80153613dd8565b634e487b7160e01b5f52601160045260245ffd5b50505f90565b6001600160a01b03906004358281169081810361021a576024359384169182850361021a5760443592831580611d0a575b611d025773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03611ce357504791808310611cdb5750611cd9929350613c39565b565b905083613bad565b9050611cef3085613b79565b91808310611cdb5750611cd99293613bd0565b505050509050565b508015611ca5565b90919063c1fb425e8103611d925750810160c08282031261021a57611d368261150f565b611d438260208501611663565b9160a084013567ffffffffffffffff811161021a57611d72611d7a926001600160a01b03926117a59701611645565b921683613c8f565b506d1ff3684f28c67538d4d072c227343314926142ed565b6322ce6ede03611c6e578101906101008183031261021a57611db38161150f565b9267ffffffffffffffff602083013581811161021a5784611dd5918501611645565b90611de38560408601611663565b9460c085013591821161021a57611dfb918501611645565b80516089019485608911611c5a57611e7591601f19611e32611e1c896115f3565b98611e2a6040519a8b6115d0565b808a526115f3565b013660208901378151602001518760480152604082602001886068015e6d1ff3684f28c67538d4d072c2273433148760a801538051906020018760a9015e61403c565b90945f907f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116111bd5795915b825190602c82106107bc57866014850151601586015194601887015190602c8801519483869087996001600160a01b0389166001600160a01b038816101561223b575b60ff8181168061210d575050506001600160a01b0391611f6791731f98431c8ad98523631ae4a59f267346ea31f9847fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33985b62ffffff16906040519387165f528616602052806040521560051b6060035f209160405261401d565b1691855190858760280152866014015285528c602c88115f146120925750611fed6001600160a01b0393878594611fe8611ffc95611fda6040519b8c9586938d8c8084169116105f14612074578d8c806401000276a4945b630251596160e31b60208a01521691161030602487016142b7565b03601f1981018452836115d0565b613fa7565b602080825183010191016122b5565b9590946040525b169116101561206d57505b5f03915f83126111bd57602c8392111561204857505030909160188151106107bc5780516017190160189091019081526028865291611ea3565b949396509450505060e0810135831061206357505050600190565b60e0013590613bad565b905061200e565b8d8c8073fffd8963efd1fc6a506488495d951d5263988d2594611fbf565b926001600160a01b036120e993611fe889611fda849b9a8a611fed98879b888616898416105f146120f157886401000276a4935b816040519b8c99630251596160e31b60208c0152169116109116602487016142b7565b949093612003565b8873fffd8963efd1fc6a506488495d951d5263988d25936120c6565b60018103612167575050506001600160a01b0391611f67917341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c97f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7598611f3e565b600281036121c1575050506001600160a01b0391611f679173baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f7fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3398611f3e565b600391929394959697989950145f1461222a575050611f678d96959493926001600160a01b03927370fe4a44ea505cfa3a57b95cf2862d4fd5f0f6877fe9b68c5f77858eecac2e651646e208175e9b1359d68d0e14fc69f8c54e5010bf92633a1c453c98611f3e565b63d3b1276d5f52166020526024601cfd5b869250889150611ee6565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b606061166094936001600160a01b0360c094168352805160208401526020810151151560408401526040810151151582840152015160030b60808201528160a08201520190612246565b919082604091031261021a576020825192015190565b9081602091031261021a57516001600160a01b038116810361021a5790565b91906101008382031261021a576123008361150f565b9261230d6020820161150f565b9260408201359261232060608401611523565b9260808101359260a08201359260c083013567ffffffffffffffff811161021a5760e091611739918501611645565b90919063d92aadfb810361270257508101906101208183031261021a576123758161150f565b916123838160208401611663565b9061239060a0840161150f565b9360c084013567ffffffffffffffff811161021a576124d7936124f65f936123bd60409686958a01611645565b926123ca60e08a0161150f565b988992610100809201359b6123fd6001600160a01b0380936123f661271019602089510151111561429c565b1685613c8f565b6124e661245f85889a949a5151168e519061241782611598565b81528360208201528686168f82015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9f6124cd6fc824a45acd1e9517bb0cb8d0d5cde8935c8f8890519161248383611598565b818d16835284602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9e8f993090613b79565b8181118183180218809361474c565b9d8e60208a015284841690613bd0565b8980519661250388611598565b60588852612630603c60208a01997f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e748b527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c858201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152845161258a8161157c565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519c8d937f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208601525180918686015e830190848201905f8252519283915e018d8382015203601c81018b5201896115d0565b81519b8c9663137c29fe8852818151896020015e602001876060015e8560a0015e168260e001520152610140808661012001528151916101609187848401910152868360200192015e8151918260200190828701610180015e016101840183601c01826e22d473030f116ddee9f6b43ac78ba35af1156104085750906fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a1568103612b17575081019060808183031261021a576127248161150f565b9160408201359067ffffffffffffffff821161021a57612745918301611645565b9061271061278c83516020850151906bffffffffffffffffffffffff19918281169160148110612b02575b50509050612787602085013591309060601c613b79565b613cc0565b04936040519361279b8561157c565b60288552604036602087013730937f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff879197116111bd57935b8651602c81106107bc576014880151958760158a01519760188b0194855190602c8d015194838690879d6001600160a01b0389166001600160a01b0388161015612af7575b60ff818116806129da575050506001600160a01b039161289991731f98431c8ad98523631ae4a59f267346ea31f9847fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e339862ffffff16906040519387165f528616602052806040521560051b6060035f209160405261401d565b16918551908587602801528660140152855288602c88115f1461297c5750611fed6001600160a01b0393878594611fe861290a95611fda6040519b8c9586938d8c8084169116105f1461207457630251596160e31b60208601526401000276a4918c168c8f161030602487016142b7565b9590946040525b169116101561297557505b5f03955f87126111bd57602c8792111561295057505030949660188151106107bc57516017190181526028865295936127d4565b95509550505093506060810135831061296b57505050600190565b6060013590613bad565b905061291c565b926001600160a01b036129d293611fe889611fda849b9a8a611fed98879b888616898416105f146120f157886401000276a493816040519b8c99630251596160e31b60208c0152169116109116602487016142b7565b949093612911565b60018103612a34575050506001600160a01b0391612899917341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c97f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7598611f3e565b60028103612a8e575050506001600160a01b03916128999173baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f7fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3398611f3e565b600391929394959697989950145f1461222a5750506128998e96959493926001600160a01b03927370fe4a44ea505cfa3a57b95cf2862d4fd5f0f6877fe9b68c5f77858eecac2e651646e208175e9b1359d68d0e14fc69f8c54e5010bf92633a1c453c98611f3e565b869250889150612819565b8391925060140360031b1b1616805f80612770565b91929163103b48be8103612dae57508260c0918101031261021a57612b3b8261150f565b916020612b4981830161150f565b9060409081840135612b5d6060860161150f565b9460808101359062ffffff8216820361021a5760a00135956001600160a01b038080971691169260018080851614935f9280612d95575b50928293885193612d5f575b630902f1ac5f52885f6004601c8a5afa15612d5657883d1061021a578560051b94855192868a1851948084811c1614821517612d11575b506060938b93601c9e9f935f9361ffff6127109260081c16820302920282019102049c8d968187019763022c0d9f88526080808901528360a08901528b82890101526004018a1886010152169101525f8060a48382875af1156104085750858710612c485750505050505050600190565b60049291829115612cb3578451938480927fd21220a70000000000000000000000000000000000000000000000000000000082525afa928315611aad57505f92612c96575b50505b16613bad565b612cac9250803d10611aa657611a9781836115d0565b8480612c8d565b8451938480927f0dfe16810000000000000000000000000000000000000000000000000000000082525afa928315611aad57505f92612cf4575b5050612c90565b612d0a9250803d10611aa657611a9781836115d0565b8480612ced565b8991506024601c5f926370a0823184528b85525afa15612d5657873d1061021a575f51838110612d45578390036060612bd7565b601189634e487b715f52526024601cfd5b833d5f823e3d90fd5b63a9059cbb845286888501528489850152875f6044601c870182865af115612d5657825f5114883d1015163d1517612ba0575f80fd5b612710919350612da53086613b79565b0204915f612b94565b92836338c9c147829495145f14612e215750019060a08183031261021a57612dd58161150f565b90612de26040820161150f565b90608081013567ffffffffffffffff811161021a576117a594612e06918301611645565b9260206001600160a01b0360608401359416920135906140e1565b63c876d21d8103612ed257506060918101031261021a57612e418161150f565b6040612e4f6020840161150f565b920135916001600160a01b0391821691811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03612ea157504791808311612e8e575b505050600190565b612e99920390613c39565b5f8080612e86565b90612eac3083613b79565b92808411612ebe575b50505050600190565b612ec9930391613bd0565b5f808080612eb5565b905063af72634f8103612f0a57506001600160a01b03612efb8361179e936117a39501906122ea565b9790969591959492941661467c565b829063bfda529281036131e857506080918101031261021a57612f2c8161150f565b60209081830135926040936001600160a01b036060612f4c878501611523565b9301359316911561310057306014526f70a082310000000000000000000000005f52835f60246010736b175474e89094c44da98b954eedeac495271d0f5afa156130f6573d601f101561021a57612710905f510204918451927ffae036d500000000000000000000000000000000000000000000000000000000845273f6e72db5454dd049d0788e411b06cfaf16853042938581600481885afa80156130ec575f906130b7575b670de0b6b3a7640000915001907f00000000000000000000000000000000000000000000000000000000000f424002049080821061307f57505f80936044936010936034526014526f8d7ef9bb00000000000000000000000082525af1156130685750601f3d111561021a575f603452600190565b516bffffffffffffffffffffffff163d5f823e3d90fd5b9060545260345273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486014526f97a6f3b90000000000000000000000005f5260646010fd5b508581813d83116130e5575b6130cd81836115d0565b8101031261021a57670de0b6b3a76400009051612ff3565b503d6130c3565b87513d5f823e3d90fd5b84513d5f823e3d90fd5b93929193306014526f70a082310000000000000000000000005f52825f6024601073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485afa156131de573d601f101561021a57612710905f5102046034526014526f959912760000000000000000000000005f525f604460108273f6e72db5454dd049d0788e411b06cfaf168530425af1156130685750601f3d111561021a575f6034525f518181106131a7575050600190565b605452603452736b175474e89094c44da98b954eedeac495271d0f6014526f97a6f3b90000000000000000000000005f5260646010fd5b83513d5f823e3d90fd5b905063fd8c38e18103613231575090613203918101906122ea565b926127108698979598939293116111bd576117a39763ffffffff966117fa966001600160a01b038a1661467c565b82906367848fe7810361352a575060c0918101031261021a576132538161150f565b90602061326181830161150f565b9060409182840135936060810135916001600160a01b039081841680940361021a5760a061329160808501611523565b930135965f9080613513575b50806135005750836132ae91613b79565b85517f1865c57d0000000000000000000000000000000000000000000000000000000081526101208082600481895afa9182156134f6579088949392915f926133f6575b50506fffffffffffffffffffffffffffffffff809188875f146133ee575051165b169003975b83156133e357637fffffff5b8351996133308b611598565b8a52841515878b01525f848b015260030b60608a015261338b8351613354816115b4565b5f815284519a8b9485947f3eece7db000000000000000000000000000000000000000000000000000000008652166004850161226b565b03815f865af19586156130f6575f966133b2575b50848610611a3457505050505050600190565b6133d3919650843d86116133dc575b6133cb81836115d0565b8101906122b5565b9050945f61339f565b503d6133c1565b637fffffff19613324565b015116613313565b818096508193503d83116134ef575b61340f81836115d0565b8101031261021a57875193840184811067ffffffffffffffff82111761154c57885261343a81614087565b8452613447878201614087565b878501526134568882016140a4565b88850152613466606082016140a4565b6060850152608081015164ffffffffff8116810361021a57608085015260a08101518060030b810361021a5760a085015260c0810151801515810361021a5760c085015260e081015163ffffffff8116810361021a5760e0850152610100809101519060ff8216820361021a5784015286926fffffffffffffffffffffffffffffffff806132f2565b503d613405565b88513d5f823e3d90fd5b9761350e8986899594613bd0565b613318565b61271091506135223084613b79565b02045f61329d565b9050636c5f9cf98103613625575090613545918101906122ea565b612710869793969892959498116111bd576f7fffffffffffffffffffffffffffffff81116111bd57606088029780890460601490151715611c5a57606086029580870460601490151715611c5a576fffffffffffffffffffffffffffffffff8089116111bd5786116111bd576117a39760d3966001600160a01b039460405199885180996020018c8c015e8a60b301528960b101523089609d015288608801528760780152866068015216846058015281606f0184604401526020846024015263f83d08ba84600401528160b30184528360a80153820101604052613dd8565b829063ca9e5d0f8103613779575060c0918101031261021a576136478161150f565b6136536020830161150f565b60408301356060840135936001600160a01b03918286169384870361021a578360a061368160808601611523565b94013596169482613758575b5050505f146136e657506014526fdd93f59a0000000000000000000000005f5260205f6024601082865af1156104c257601f3d111561021a575f51918183106136d857505050600190565b6136e190614647565b613bad565b906014526fbd6015b40000000000000000000000005f5260205f6024601082875af1156104c257601f3d111561021a575f51928284106137295750505050600190565b5f6004601c60209363d4b9704684525afa156104c257601f3d111561021a575f518060a01c61021a5716613bad565b612710613771936137693085613b79565b020491613bd0565b5f808061368d565b63b8df6d4d14159050611c6e578160a0918101031261021a5761379b8161150f565b90602060409182810135906001600160a01b0382169485830361021a576060906137ea6137c9838501611523565b916127108760808701359601356137e03084613b79565b020498899161450d565b15613b3b5782905f9686516137fe81611560565b888152868101898152888201918a8352848101928b845260808201928c845260a08301948d865260c084019d8e5263ffa642255f526004958d5f88601c809d5afa15613b3157603f3d111561021a578c5f888c8f8351855187528b526317be952e84525afa15613b3157601f9e8f3d111561021a575f518060081c61021a5760ff166003811015613b14575f8f918f8e908c92865263796da7af84525afa15613b27578f3d111561021a578d5f898f8e9083518b52637c9b8e8984525afa15613b27578f3d111561021a578d5f898f8e908351885263eab5d20e84525afa15613b27578f3d111561021a578d5f898f8e9083518a5263ec2fd46d84525afa15613b27578f3d111561021a575f51845280516003811015613b14576139c657505050505061392c915083614e4a565b905b63c0ffa1785f52875f82878a5afa156134f657893d111561021a57875f80519263ab44a7a38252878a5afa156134f657893d111561021a57670de0b6b3a764000080915f510101910204938085106139bb5750925f949285926084958951809a819563e67ce7068352828c015201528281015282826080015201915af11561040857503d116117a5575f80fd5b84906136e187614647565b949192939451926003841015613b01576001938403613a85575050516ec097ce7bc90715b34b9f1000000000049351925193670de0b6b3a764000092519383818602040293830390838881888502049202048686040190818110155f14613a7a5703908383955b8260021b020482800201928084811c01845b858210613a6a5750501b9315613a6357015b0290808204910615150190039061392e565b9003613a51565b9094508481048501821c90613a3f565b900390835f95613a2d565b94519551905194519591949392509003848303808811613ae9575050858401938493516ec097ce7bc90715b34b9f1000000000049151670de0b6b3a7640000808097868297020402838082049106151501820204908403019303020402049061392e565b91509350613afa9291508503614e4a565b019061392e565b602188634e487b7160e01b5f525260245ffd5b602189634e487b7160e01b5f525260245ffd5b8e513d5f823e3d90fd5b8d513d5f823e3d90fd5b6084929185965f959651978891638dae73338352828901520152858101528285608001528285601c01915af1156104085750601f3d116117a5575f80fd5b602460105f926020946014526f70a0823100000000000000000000000084525afa156104c2573d601f101561021a575f5190565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115613c20573d153d601f1060015f5114161715613c13575f603452565b6390b8ec185f526004601cfd5b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b5f80809381935af1156104c257565b91908203918211611c5a57565b336d1ff3684f28c67538d4d072c2273403613c7c57601319360190368211611c5a575f9190565b5f903690565b91908201809211611c5a57565b9091613cbb60405192613ca184611530565b60208401935f85526001600160a01b03819616905261403c565b809252565b81810292918115918404141715611c5a57565b9395949897929096986f7fffffffffffffffffffffffffffffff84116111bd5782606081020460601483151715611c5a5781606081020460601482151715611c5a576fffffffffffffffffffffffffffffffff8060608502116111bd5760608302116111bd5760405199878b9851978881519a8b93848284018101610115015260200190610132015e6020018c8901610132015e8a87018801610135016040528a610131015360406020820160f18c015e5160409060b18b015e88609d015f90526060028860880152606002876078015286606801528560580152018060d10184604401528360240160209052836004016348c8949190526101150183528260a80153565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d444906fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b031682146114f3576f07f49fa1cdccd5c65a7d4860ce3abbe991825c80613e8c57505f9182917fb45a3c0e0000000000000004e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d444855d82602083519301915af190613e636140b2565b9115613e83575c80613e73575090565b63d66fcc385f526020526024601cfd5b50602081519101fd5b63ab7646c45f526020526024601cfd5b73ba1333333333a1ba1108e8412f11850a5c319ba96fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b031681146114f3576f07f49fa1cdccd5c65a7d4860ce3abbe992835c80613e8c5750915f92917403ba1333333333a1ba1108e8412f11850a5c319ba9849360e01b17855d82602083519301915af190613e636140b2565b6e04444c5dc75cb358380d2e3de08a90906fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b031682146114f3576f07f49fa1cdccd5c65a7d4860ce3abbe991825c80613e8c57505f9182917f91dd73460000000000000006000000000004444c5dc75cb358380d2e3de08a90855d82602083519301915af190613e636140b2565b6001600160a01b03809116906fc824a45acd1e9517bb0cb8d0d5cde8935c1681146114f3576f07f49fa1cdccd5c65a7d4860ce3abbe992835c80613e8c57509181740200000000000000000000000000000000000000005f9493859460e01b1717855d82602083519301915af190613e636140b2565b9160406055938151908152600b81019360ff8553602082015201522090565b51906020820151916127101983116140515750565b916140826127116001600160a01b03611660949551169201916fc824a45acd1e9517bb0cb8d0d5cde8935c90613b79565b61445a565b51906fffffffffffffffffffffffffffffffff8216820361021a57565b51908160070b820361021a57565b3d156140dc573d906140c3826115f3565b916140d160405193846115d0565b82523d5f602084013e565b606090565b9291906001600160a01b03808316946d1ff3684f28c67538d4d072c2273486148015614284575b6114f3575f9181169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee82036142145750505061413c6127109147613cc0565b04938051155f1461419857505061416e575f80809381935af161415d6140b2565b90156141665750565b602081519101fd5b60046040517f01da1572000000000000000000000000000000000000000000000000000000008152fd5b90939260208301808411611c5a578251106107bc57835f9460208695850101525b602083519301915af16141ca6140b2565b9015614166575115908161420a575b506141e057565b60046040517f82d5d76a000000000000000000000000000000000000000000000000000000008152fd5b90503b155f6141d9565b9091949282979497155f146142335750505061416e575f9283926141b9565b6142469061408297949693973084613b79565b60208601808711611c5a578551106107bc5787845f988360208b9a8a01015203614273575b5050506141b9565b61427c9261450d565b5f808761426b565b506e22d473030f116ddee9f6b43ac78ba38614614108565b156142a357565b634e487b7160e01b5f52600160045260245ffd5b919360a09361166096956001600160a01b0380941685521515602085015260408401521660608201528160808201520190612246565b9190925f146143bb57516143ae5760208101516111bd576040810151421161439a576bffffffffffffffffffffffff199051516fc824a45acd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c01525f80608483601c01826d1ff3684f28c67538d4d072c227345af1156104085750565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b5f919290829160406fc824a45acd1e9517bb0cb8d0d5cde8935c91818051976330f28b7a89528181518a6020015e602001886060015e8660a0015e6001600160a01b03168460e0015261010084810152805190816020019085610120015e6101240183601c01826e22d473030f116ddee9f6b43ac78ba35af1156104085750565b604051906144498261157c565b5f6040838281528260208201520152565b5f198282098282029182808310920391808303916127109586910992828611156111bd57146144b8577fbc01a36e2eb1c432ca57a786c226809d495182a9930be0ded288ce703afb7e919350828211900360fc1b910360041c170290565b50500490565b356001600160a01b038116810361021a5790565b6040519060a0820182811067ffffffffffffffff82111761154c576040525f6080838281528260208201528260408201528260608201520152565b906001600160a01b036040519384917fdd62ed3e0000000000000000000000000000000000000000000000000000000083523060048401528084166024840152826044602097889388165afa9182156104c2575f92614618575b508110614575575b50505050565b6145d0575b60105f80936044936014525f196034526f095ea7b300000000000000000000000082525af115613c20573d153d601f1060015f51141617156145c3575f6034525f80808061456f565b633e3f8f735f526004601cfd5b806014525f6034526f095ea7b30000000000000000000000005f52825f6044601082865af115613c20573d153d601f1060015f5114161761457a57633e3f8f735f526004601cfd5b9091508481813d8311614640575b61463081836115d0565b8101031261021a5751905f614567565b503d614626565b5f6004601c602093634a248d2a84525afa156104c257601f3d111561021a575f518060a01c61021a576001600160a01b031690565b92939095949796919761271089116111bd576f7fffffffffffffffffffffffffffffff83116111bd57606082029180830460601490151715611c5a57606081029080820460601490151715611c5a576fffffffffffffffffffffffffffffffff8083116111bd5781116111bd5760d39660405199875180986020018c8b015e8a60b301528960b101523089609d0152886088015287607801528660680152856058015281606f018560440152602085602401526348c8949185600401528160b30185528460a80153830101604052565b915f1982840981838502938480841093039509908085146147b45782805f0316809304600280826003021880830282030280830282030280830282030280830282030280830282030280920290030294600184805f0304019185841191030302920304170290565b505091500490565b9092949391945f90604051938460c0015f8152610300386101e08801396104e086016040526147f1838a873560601c84614f2b565b928387528387602001528660400199848b5287608001528660a001529495369436935f9373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0380936020015116145f146148765761484c9116301461429c565b985161271061ffff8b3560501c16470204905260151901976016015b62ffffff89116107bc579796565b163081036148af5750612710601519823560501c9260160193019a519161ffff6148a4308560200151613b79565b911602049052614868565b935094509750506148c191501561429c565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161021a57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8891030197614868565b9060208201359161271019831161494a5750565b916140826127116001600160a01b0361496661166095966144be565b169201916fc824a45acd1e9517bb0cb8d0d5cde8935c90613b79565b94959091956001600160a01b039473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee868816145f146149c057505050505050506116608133613c39565b60209596976040519889602401526f0c11dedd000000000000000000000000896010015288604401526044933003614a83575b50505080915084528301016040526fc824a45acd1e9517bb0cb8d0d5cde8935c1633146114f3576f07f49fa1cdccd5c65a7d4860ce3abbe990815c80613e8c57505f80917f599d0714000000000000000500000000000000000000000000000000000000003317845d60208151910182335af190614a6f6140b2565b9115613e83575c80613e7357506060015190565b829350604060c495810189606401378760a4015281878501528660e4013701805f80806149f3565b60400151805115614ab95750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c9182614aeb575b50505050508101920390565b95839496614b30945180604001805115614bd2575b5050818411614b57575b50601491925001948360800151906001600160a01b038560a001519360581c1690614f2b565b9081815260400151809114614b485780808080614adf565b8063784cb7b860249252601c01fd5b85602001938451805115614bc2575b5060028103614b8157505060149192855190525b8291614b0a565b60149350614b9391925060031461429c565b8582013592614bbb60159287608001516001600160a01b038960a001519260581c168b614f2b565b9052614b7a565b614bcc908a614ef5565b5f614b66565b898051850180825260051b01918252525f80614b00565b905f8212614bf5575090565b80634c085bf160249252601c01fd5b60601b90821561041057604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af115610408575f606052604052565b60601b90821561041057604051926060526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af115610408575f606052604052565b60601b90821561041057604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af115610408575f606052604052565b919591949392906001600160a01b03163003614d83575050505081614d73575b6014526034526f15afd4090000000000000000000000005f5260205f6044601082335af115613c20575f515f60345290565b614d7e823383613bd0565b614d41565b610100614d7e94614daa60405193614d9a85611530565b3385528960208601523690611663565b93369161160f565b93959290949194846014526fa58411940000000000000000000000005f525f806024601082335af1156104c2576001600160a01b03163003614e1957505050614dfd92503390613bd0565b6311da60b45f5260205f6004601c82335af1156104c2575f5190565b614e45959492935090614daa6101009260405194614e3686611530565b33865260208601523690611663565b614dfd565b9080516ec097ce7bc90715b34b9f100000000004906080810151926020670de0b6b3a76400009201519282858181870204029481039281878502049202048585040190818110155f14614eeb5703826001945b8360021b02048180020191600183811c01835b848210614eda57505060011b9315614ed357015b02908082049106151501900390565b9003614ec4565b909350838104840160011c90614eb0565b9003825f94614e9d565b906040019081519182614f0757505050565b5f905280515f198101825260051b01818103614f21575050565b5180825260400152565b919392610300916001600160a01b0316948509060191610120830192610140810190815190816101608582189201511702614f7757508115614f6a5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd
Verified Source Code Partial Match
Compiler: v0.8.25+commit.b61c2a91
EVM: cancun
Optimization: Yes (2000 runs)
MainnetTakerSubmittedFlat.sol 8676 lines
// SPDX-License-Identifier: MIT
pragma solidity =0.8.25 >=0.6.2 >=0.8.25 ^0.8.0 ^0.8.25;
// lib/forge-std/src/interfaces/IERC20.sol
/// @dev Interface of the ERC20 standard as defined in the EIP.
/// @dev This includes the optional name, symbol, and decimals metadata.
interface IERC20 {
/// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).
event Transfer(address indexed from, address indexed to, uint256 value);
/// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value`
/// is the new allowance.
event Approval(address indexed owner, address indexed spender, uint256 value);
/// @notice Returns the amount of tokens in existence.
function totalSupply() external view returns (uint256);
/// @notice Returns the amount of tokens owned by `account`.
function balanceOf(address account) external view returns (uint256);
/// @notice Moves `amount` tokens from the caller's account to `to`.
function transfer(address to, uint256 amount) external returns (bool);
/// @notice Returns the remaining number of tokens that `spender` is allowed
/// to spend on behalf of `owner`
function allowance(address owner, address spender) external view returns (uint256);
/// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.
/// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
function approve(address spender, uint256 amount) external returns (bool);
/// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism.
/// `amount` is then deducted from the caller's allowance.
function transferFrom(address from, address to, uint256 amount) external returns (bool);
/// @notice Returns the name of the token.
function name() external view returns (string memory);
/// @notice Returns the symbol of the token.
function symbol() external view returns (string memory);
/// @notice Returns the decimals places of the token.
function decimals() external view returns (uint8);
}
// lib/permit2/src/interfaces/IEIP712.sol
interface IEIP712 {
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
// src/Context.sol
abstract contract AbstractContext {
function _msgSender() internal view virtual returns (address);
function _msgData() internal view virtual returns (bytes calldata);
function _isForwarded() internal view virtual returns (bool);
}
abstract contract Context is AbstractContext {
function _msgSender() internal view virtual override returns (address) {
return msg.sender;
}
function _msgData() internal view virtual override returns (bytes calldata) {
return msg.data;
}
function _isForwarded() internal view virtual override returns (bool) {
return false;
}
}
// src/IERC721Owner.sol
interface IERC721Owner {
function ownerOf(uint256) external view returns (address);
}
// src/allowanceholder/IAllowanceHolder.sol
interface IAllowanceHolder {
/// @notice Executes against `target` with the `data` payload. Prior to execution, token permits
/// are temporarily stored for the duration of the transaction. These permits can be
/// consumed by the `operator` during the execution
/// @notice `operator` consumes the funds during its operations by calling back into
/// `AllowanceHolder` with `transferFrom`, consuming a token permit.
/// @dev Neither `exec` nor `transferFrom` check that `token` contains code.
/// @dev msg.sender is forwarded to target appended to the msg data (similar to ERC-2771)
/// @param operator An address which is allowed to consume the token permits
/// @param token The ERC20 token the caller has authorised to be consumed
/// @param amount The quantity of `token` the caller has authorised to be consumed
/// @param target A contract to execute operations with `data`
/// @param data The data to forward to `target`
/// @return result The returndata from calling `target` with `data`
/// @notice If calling `target` with `data` reverts, the revert is propagated
function exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)
external
payable
returns (bytes memory result);
/// @notice The counterpart to `exec` which allows for the consumption of token permits later
/// during execution
/// @dev *DOES NOT* check that `token` contains code. This function vacuously succeeds if
/// `token` is empty.
/// @dev can only be called by the `operator` previously registered in `exec`
/// @param token The ERC20 token to transfer
/// @param owner The owner of tokens to transfer
/// @param recipient The destination/beneficiary of the ERC20 `transferFrom`
/// @param amount The quantity of `token` to transfer`
/// @return true
function transferFrom(address token, address owner, address recipient, uint256 amount) external returns (bool);
}
// src/core/univ3forks/PancakeSwapV3.sol
address constant pancakeSwapV3Factory = 0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9;
bytes32 constant pancakeSwapV3InitHash = 0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2;
uint8 constant pancakeSwapV3ForkId = 1;
interface IPancakeSwapV3Callback {
function pancakeV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;
}
// src/core/univ3forks/SolidlyV3.sol
address constant solidlyV3Factory = 0x70Fe4a44EA505cFa3A57b95cF2862D4fd5F0f687;
address constant solidlyV3SonicFactory = 0x777fAca731b17E8847eBF175c94DbE9d81A8f630;
bytes32 constant solidlyV3InitHash = 0xe9b68c5f77858eecac2e651646e208175e9b1359d68d0e14fc69f8c54e5010bf;
uint8 constant solidlyV3ForkId = 3;
interface ISolidlyV3Callback {
function solidlyV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;
}
// src/core/univ3forks/SushiswapV3.sol
address constant sushiswapV3MainnetFactory = 0xbACEB8eC6b9355Dfc0269C18bac9d6E2Bdc29C4F;
address constant sushiswapV3Factory = 0xc35DADB65012eC5796536bD9864eD8773aBc74C4; // Base, Linea
address constant sushiswapV3ArbitrumFactory = 0x1af415a1EbA07a4986a52B6f2e7dE7003D82231e;
//address constant sushiswapV3AvalancheFactory = 0x3e603C14aF37EBdaD31709C4f848Fc6aD5BEc715;
//address constant sushiswapV3BlastFactory = 0x7680D4B43f3d1d54d6cfEeB2169463bFa7a6cf0d;
//address constant sushiswapV3BnbFactory = 0x126555dd55a39328F69400d6aE4F782Bd4C34ABb;
address constant sushiswapV3OptimismFactory = 0x9c6522117e2ed1fE5bdb72bb0eD5E3f2bdE7DBe0;
address constant sushiswapV3PolygonFactory = 0x917933899c6a5F8E37F31E19f92CdBFF7e8FF0e2;
address constant sushiswapV3ScrollFactory = 0x46B3fDF7b5CDe91Ac049936bF0bDb12c5d22202e;
address constant sushiswapV3GnosisFactory = 0xf78031CBCA409F2FB6876BDFDBc1b2df24cF9bEf;
//bytes32 constant sushiswapV3BlastInitHash = 0x8e13daee7f5a62e37e71bf852bcd44e7d16b90617ed2b17c24c2ee62411c5bae;
uint8 constant sushiswapV3ForkId = 2;
// src/core/univ3forks/UniswapV3.sol
address constant uniswapV3MainnetFactory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;
address constant uniswapV3SepoliaFactory = 0x0227628f3F023bb0B980b67D528571c95c6DaC1c;
address constant uniswapV3BaseFactory = 0x33128a8fC17869897dcE68Ed026d694621f6FDfD;
address constant uniswapV3BnbFactory = 0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7;
address constant uniswapV3AvalancheFactory = 0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD;
address constant uniswapV3BlastFactory = 0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd;
address constant uniswapV3ScrollFactory = 0x70C62C8b8e801124A4Aa81ce07b637A3e83cb919;
address constant uniswapV3LineaFactory = 0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9;
address constant uniswapV3MantleFactory = 0x0d922Fb1Bc191F64970ac40376643808b4B74Df9;
address constant uniswapV3TaikoFactory = 0x75FC67473A91335B5b8F8821277262a13B38c9b3;
address constant uniswapV3WorldChainFactory = 0x7a5028BDa40e7B173C278C5342087826455ea25a;
address constant uniswapV3GnosisFactory = 0xe32F7dD7e3f098D518ff19A22d5f028e076489B1;
address constant uniswapV3SonicFactory = 0xcb2436774C3e191c85056d248EF4260ce5f27A9D;
address constant uniswapV3InkFactory = 0x640887A9ba3A9C53Ed27D0F7e8246A4F933f3424;
address constant uniswapV3MonadTestnetFactory = 0x961235a9020B05C44DF1026D956D1F4D78014276;
address constant uniswapV3UnichainFactory = 0x1F98400000000000000000000000000000000003; // https://github.com/Uniswap/contracts/blob/main/deployments/130.md#fri-nov-08-2024
bytes32 constant uniswapV3InitHash = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;
uint8 constant uniswapV3ForkId = 0;
interface IUniswapV3Callback {
function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;
}
// src/deployer/DeployerAddress.sol
address constant DEPLOYER = 0x00000000000004533Fe15556B1E086BB1A72cEae;
// src/utils/FastLogic.sol
library FastLogic {
function or(bool a, bool b) internal pure returns (bool r) {
assembly ("memory-safe") {
r := or(a, b)
}
}
function and(bool a, bool b) internal pure returns (bool r) {
assembly ("memory-safe") {
r := and(a, b)
}
}
}
// src/utils/FreeMemory.sol
abstract contract FreeMemory {
modifier DANGEROUS_freeMemory() {
uint256 freeMemPtr;
assembly ("memory-safe") {
freeMemPtr := mload(0x40)
}
_;
assembly ("memory-safe") {
mstore(0x40, freeMemPtr)
}
}
}
// src/utils/Panic.sol
library Panic {
function panic(uint256 code) internal pure {
assembly ("memory-safe") {
mstore(0x00, 0x4e487b71) // selector for `Panic(uint256)`
mstore(0x20, code)
revert(0x1c, 0x24)
}
}
// https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require
uint8 internal constant GENERIC = 0x00;
uint8 internal constant ASSERT_FAIL = 0x01;
uint8 internal constant ARITHMETIC_OVERFLOW = 0x11;
uint8 internal constant DIVISION_BY_ZERO = 0x12;
uint8 internal constant ENUM_CAST = 0x21;
uint8 internal constant CORRUPT_STORAGE_ARRAY = 0x22;
uint8 internal constant POP_EMPTY_ARRAY = 0x31;
uint8 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
uint8 internal constant OUT_OF_MEMORY = 0x41;
uint8 internal constant ZERO_FUNCTION_POINTER = 0x51;
}
// src/utils/Revert.sol
library Revert {
function _revert(bytes memory reason) internal pure {
assembly ("memory-safe") {
revert(add(reason, 0x20), mload(reason))
}
}
function maybeRevert(bool success, bytes memory reason) internal pure {
if (!success) {
_revert(reason);
}
}
}
// lib/forge-std/src/interfaces/IERC4626.sol
/// @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
/// https://eips.ethereum.org/EIPS/eip-4626
interface IERC4626 is IERC20 {
event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares
);
/// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
/// @dev
/// - MUST be an ERC-20 token contract.
/// - MUST NOT revert.
function asset() external view returns (address assetTokenAddress);
/// @notice Returns the total amount of the underlying asset that is “managed” by Vault.
/// @dev
/// - SHOULD include any compounding that occurs from yield.
/// - MUST be inclusive of any fees that are charged against assets in the Vault.
/// - MUST NOT revert.
function totalAssets() external view returns (uint256 totalManagedAssets);
/// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
/// scenario where all the conditions are met.
/// @dev
/// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
/// - MUST NOT show any variations depending on the caller.
/// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
/// - MUST NOT revert.
///
/// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
/// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
/// from.
function convertToShares(uint256 assets) external view returns (uint256 shares);
/// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
/// scenario where all the conditions are met.
/// @dev
/// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
/// - MUST NOT show any variations depending on the caller.
/// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
/// - MUST NOT revert.
///
/// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
/// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
/// from.
function convertToAssets(uint256 shares) external view returns (uint256 assets);
/// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
/// through a deposit call.
/// @dev
/// - MUST return a limited value if receiver is subject to some deposit limit.
/// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
/// - MUST NOT revert.
function maxDeposit(address receiver) external view returns (uint256 maxAssets);
/// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
/// current on-chain conditions.
/// @dev
/// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
/// call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
/// in the same transaction.
/// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
/// deposit would be accepted, regardless if the user has enough tokens approved, etc.
/// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
/// - MUST NOT revert.
///
/// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
/// share price or some other type of condition, meaning the depositor will lose assets by depositing.
function previewDeposit(uint256 assets) external view returns (uint256 shares);
/// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
/// @dev
/// - MUST emit the Deposit event.
/// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
/// deposit execution, and are accounted for during deposit.
/// - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
/// approving enough underlying tokens to the Vault contract, etc).
///
/// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
/// @dev
/// - MUST return a limited value if receiver is subject to some mint limit.
/// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
/// - MUST NOT revert.
function maxMint(address receiver) external view returns (uint256 maxShares);
/// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
/// current on-chain conditions.
/// @dev
/// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
/// in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
/// same transaction.
/// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
/// would be accepted, regardless if the user has enough tokens approved, etc.
/// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
/// - MUST NOT revert.
///
/// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
/// share price or some other type of condition, meaning the depositor will lose assets by minting.
function previewMint(uint256 shares) external view returns (uint256 assets);
/// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
/// @dev
/// - MUST emit the Deposit event.
/// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
/// execution, and are accounted for during mint.
/// - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
/// approving enough underlying tokens to the Vault contract, etc).
///
/// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
/// Vault, through a withdraw call.
/// @dev
/// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
/// - MUST NOT revert.
function maxWithdraw(address owner) external view returns (uint256 maxAssets);
/// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
/// given current on-chain conditions.
/// @dev
/// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
/// call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
/// called
/// in the same transaction.
/// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
/// the withdrawal would be accepted, regardless if the user has enough shares, etc.
/// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
/// - MUST NOT revert.
///
/// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
/// share price or some other type of condition, meaning the depositor will lose assets by depositing.
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
/// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver.
/// @dev
/// - MUST emit the Withdraw event.
/// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
/// withdraw execution, and are accounted for during withdraw.
/// - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
/// not having enough shares, etc).
///
/// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
/// Those methods should be performed separately.
function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
/// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
/// through a redeem call.
/// @dev
/// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
/// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
/// - MUST NOT revert.
function maxRedeem(address owner) external view returns (uint256 maxShares);
/// @notice Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
/// given current on-chain conditions.
/// @dev
/// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
/// in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
/// same transaction.
/// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
/// redemption would be accepted, regardless if the user has enough shares, etc.
/// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
/// - MUST NOT revert.
///
/// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
/// share price or some other type of condition, meaning the depositor will lose assets by redeeming.
function previewRedeem(uint256 shares) external view returns (uint256 assets);
/// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver.
/// @dev
/// - MUST emit the Withdraw event.
/// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
/// redeem execution, and are accounted for during redeem.
/// - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
/// not having enough shares, etc).
///
/// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
/// Those methods should be performed separately.
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}
// lib/permit2/src/interfaces/ISignatureTransfer.sol
/// @title SignatureTransfer
/// @notice Handles ERC20 token transfers through signature based actions
/// @dev Requires user's token approval on the Permit2 contract
interface ISignatureTransfer is IEIP712 {
/// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount
/// @param maxAmount The maximum amount a spender can request to transfer
error InvalidAmount(uint256 maxAmount);
/// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred
/// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred
error LengthMismatch();
/// @notice Emits an event when the owner successfully invalidates an unordered nonce.
event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask);
/// @notice The token and amount details for a transfer signed in the permit transfer signature
struct TokenPermissions {
// ERC20 token address
address token;
// the maximum amount that can be spent
uint256 amount;
}
/// @notice The signed permit message for a single token transfer
struct PermitTransferFrom {
TokenPermissions permitted;
// a unique value for every token owner's signature to prevent signature replays
uint256 nonce;
// deadline on the permit signature
uint256 deadline;
}
/// @notice Specifies the recipient address and amount for batched transfers.
/// @dev Recipients and amounts correspond to the index of the signed token permissions array.
/// @dev Reverts if the requested amount is greater than the permitted signed amount.
struct SignatureTransferDetails {
// recipient address
address to;
// spender requested amount
uint256 requestedAmount;
}
/// @notice Used to reconstruct the signed permit message for multiple token transfers
/// @dev Do not need to pass in spender address as it is required that it is msg.sender
/// @dev Note that a user still signs over a spender address
struct PermitBatchTransferFrom {
// the tokens and corresponding amounts permitted for a transfer
TokenPermissions[] permitted;
// a unique value for every token owner's signature to prevent signature replays
uint256 nonce;
// deadline on the permit signature
uint256 deadline;
}
/// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection
/// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order
/// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce
/// @dev It returns a uint256 bitmap
/// @dev The index, or wordPosition is capped at type(uint248).max
function nonceBitmap(address, uint256) external view returns (uint256);
/// @notice Transfers a token using a signed permit message
/// @dev Reverts if the requested amount is greater than the permitted signed amount
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails The spender's requested transfer details for the permitted token
/// @param signature The signature to verify
function permitTransferFrom(
PermitTransferFrom memory permit,
SignatureTransferDetails calldata transferDetails,
address owner,
bytes calldata signature
) external;
/// @notice Transfers a token using a signed permit message
/// @notice Includes extra data provided by the caller to verify signature over
/// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
/// @dev Reverts if the requested amount is greater than the permitted signed amount
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails The spender's requested transfer details for the permitted token
/// @param witness Extra data to include when checking the user signature
/// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
/// @param signature The signature to verify
function permitWitnessTransferFrom(
PermitTransferFrom memory permit,
SignatureTransferDetails calldata transferDetails,
address owner,
bytes32 witness,
string calldata witnessTypeString,
bytes calldata signature
) external;
/// @notice Transfers multiple tokens using a signed permit message
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails Specifies the recipient and requested amount for the token transfer
/// @param signature The signature to verify
function permitTransferFrom(
PermitBatchTransferFrom memory permit,
SignatureTransferDetails[] calldata transferDetails,
address owner,
bytes calldata signature
) external;
/// @notice Transfers multiple tokens using a signed permit message
/// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
/// @notice Includes extra data provided by the caller to verify signature over
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails Specifies the recipient and requested amount for the token transfer
/// @param witness Extra data to include when checking the user signature
/// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
/// @param signature The signature to verify
function permitWitnessTransferFrom(
PermitBatchTransferFrom memory permit,
SignatureTransferDetails[] calldata transferDetails,
address owner,
bytes32 witness,
string calldata witnessTypeString,
bytes calldata signature
) external;
/// @notice Invalidates the bits specified in mask for the bitmap at the word position
/// @dev The wordPos is maxed at type(uint248).max
/// @param wordPos A number to index the nonceBitmap at
/// @param mask A bitmap masked against msg.sender's current bitmap at the word position
function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;
}
// src/core/SettlerErrors.sol
/// @notice Thrown when an offset is not the expected value
error InvalidOffset();
/// @notice Thrown when a validating a target contract to avoid certain types of targets
error ConfusedDeputy();
/// @notice Thrown when a target contract is invalid given the context
error InvalidTarget();
/// @notice Thrown when validating the caller against the expected caller
error InvalidSender();
/// @notice Thrown in cases when using a Trusted Forwarder / AllowanceHolder is not allowed
error ForwarderNotAllowed();
/// @notice Thrown when a signature length is not the expected length
error InvalidSignatureLen();
/// @notice Thrown when a slippage limit is exceeded
error TooMuchSlippage(IERC20 token, uint256 expected, uint256 actual);
function revertTooMuchSlippage(IERC20 buyToken, uint256 expectedBuyAmount, uint256 actualBuyAmount) pure {
assembly ("memory-safe") {
mstore(0x54, actualBuyAmount)
mstore(0x34, expectedBuyAmount)
mstore(0x14, buyToken)
mstore(0x00, 0x97a6f3b9000000000000000000000000) // selector for `TooMuchSlippage(address,uint256,uint256)` with `buyToken`'s padding
revert(0x10, 0x64)
}
}
/// @notice Thrown when a byte array that is supposed to encode a function from ISettlerActions is
/// not recognized in context.
error ActionInvalid(uint256 i, bytes4 action, bytes data);
function revertActionInvalid(uint256 i, uint256 action, bytes calldata data) pure {
assembly ("memory-safe") {
let ptr := mload(0x40)
mstore(ptr, 0x3c74eed6) // selector for `ActionInvalid(uint256,bytes4,bytes)`
mstore(add(0x20, ptr), i)
mstore(add(0x40, ptr), shl(0xe0, action)) // align as `bytes4`
mstore(add(0x60, ptr), 0x60) // offset to the length slot of the dynamic value `data`
mstore(add(0x80, ptr), data.length)
calldatacopy(add(0xa0, ptr), data.offset, data.length)
revert(add(0x1c, ptr), add(0x84, data.length))
}
}
/// @notice Thrown when the encoded fork ID as part of UniswapV3 fork path is not on the list of
/// recognized forks for this chain.
error UnknownForkId(uint8 forkId);
function revertUnknownForkId(uint8 forkId) pure {
assembly ("memory-safe") {
mstore(0x00, 0xd3b1276d) // selector for `UnknownForkId(uint8)`
mstore(0x20, and(0xff, forkId))
revert(0x1c, 0x24)
}
}
/// @notice Thrown when an AllowanceHolder transfer's permit is past its deadline
error SignatureExpired(uint256 deadline);
/// @notice An internal error that should never be thrown. Thrown when a callback reenters the
/// entrypoint and attempts to clobber the existing callback.
error ReentrantCallback(uint256 callbackInt);
/// @notice An internal error that should never be thrown. This error can only be thrown by
/// non-metatx-supporting Settler instances. Thrown when a callback-requiring liquidity
/// source is called, but Settler never receives the callback.
error CallbackNotSpent(uint256 callbackInt);
/// @notice Thrown when a metatransaction has reentrancy.
error ReentrantMetatransaction(bytes32 oldWitness);
/// @notice Thrown when any transaction has reentrancy, not just taker-submitted or metatransaction.
error ReentrantPayer(address oldPayer);
/// @notice An internal error that should never be thrown. Thrown when a metatransaction fails to
/// spend a coupon.
error WitnessNotSpent(bytes32 oldWitness);
/// @notice An internal error that should never be thrown. Thrown when the payer is unset
/// unexpectedly.
error PayerSpent();
error DeltaNotPositive(IERC20 token);
error DeltaNotNegative(IERC20 token);
error ZeroSellAmount(IERC20 token);
error ZeroBuyAmount(IERC20 buyToken);
error BoughtSellToken(IERC20 sellToken);
error TokenHashCollision(IERC20 token0, IERC20 token1);
error ZeroToken();
/// @notice Thrown for liquidities that require a Newton-Raphson approximation to solve their
/// constant function when Newton-Raphson fails to converge on the solution in a
/// "reasonable" number of iterations.
error NotConverged();
/// @notice Thrown when the encoded pool manager ID as part of PancakeSwap Infinity fill is not on
/// the list of recognized pool managers.
error UnknownPoolManagerId(uint8 poolManagerId);
// src/interfaces/ISettlerBase.sol
interface ISettlerBase {
struct AllowedSlippage {
address payable recipient;
IERC20 buyToken;
uint256 minAmountOut;
}
}
// src/utils/Ternary.sol
library Ternary {
function ternary(bool c, uint256 x, uint256 y) internal pure returns (uint256 r) {
assembly ("memory-safe") {
r := xor(y, mul(xor(x, y), c))
}
}
function ternary(bool c, int256 x, int256 y) internal pure returns (int256 r) {
assembly ("memory-safe") {
r := xor(y, mul(xor(x, y), c))
}
}
function maybeSwap(bool c, uint256 x, uint256 y) internal pure returns (uint256 a, uint256 b) {
assembly ("memory-safe") {
let t := mul(xor(x, y), c)
a := xor(x, t)
b := xor(y, t)
}
}
function maybeSwap(bool c, int256 x, int256 y) internal pure returns (int256 a, int256 b) {
assembly ("memory-safe") {
let t := mul(xor(x, y), c)
a := xor(x, t)
b := xor(y, t)
}
}
function maybeSwap(bool c, IERC20 x, IERC20 y) internal pure returns (IERC20 a, IERC20 b) {
(uint256 a_, uint256 b_) = maybeSwap(c, uint160(address(x)), uint160(address(y)));
a = IERC20(address(uint160(a_)));
b = IERC20(address(uint160(b_)));
}
function maybeSwap(bool c, address x, address y) internal pure returns (address a, address b) {
(uint256 a_, uint256 b_) = maybeSwap(c, uint160(x), uint160(y));
a = address(uint160(a_));
b = address(uint160(b_));
}
}
// src/utils/UnsafeMath.sol
library UnsafeMath {
function unsafeInc(uint256 x) internal pure returns (uint256) {
unchecked {
return x + 1;
}
}
function unsafeInc(uint256 x, bool b) internal pure returns (uint256) {
assembly ("memory-safe") {
x := add(x, b)
}
return x;
}
function unsafeInc(int256 x) internal pure returns (int256) {
unchecked {
return x + 1;
}
}
function unsafeDec(uint256 x) internal pure returns (uint256) {
unchecked {
return x - 1;
}
}
function unsafeDec(int256 x) internal pure returns (int256) {
unchecked {
return x - 1;
}
}
function unsafeNeg(int256 x) internal pure returns (int256) {
unchecked {
return -x;
}
}
function unsafeDiv(uint256 numerator, uint256 denominator) internal pure returns (uint256 quotient) {
assembly ("memory-safe") {
quotient := div(numerator, denominator)
}
}
function unsafeDiv(int256 numerator, int256 denominator) internal pure returns (int256 quotient) {
assembly ("memory-safe") {
quotient := sdiv(numerator, denominator)
}
}
function unsafeMod(uint256 numerator, uint256 denominator) internal pure returns (uint256 remainder) {
assembly ("memory-safe") {
remainder := mod(numerator, denominator)
}
}
function unsafeMod(int256 numerator, int256 denominator) internal pure returns (int256 remainder) {
assembly ("memory-safe") {
remainder := smod(numerator, denominator)
}
}
function unsafeMulMod(uint256 a, uint256 b, uint256 m) internal pure returns (uint256 r) {
assembly ("memory-safe") {
r := mulmod(a, b, m)
}
}
function unsafeAddMod(uint256 a, uint256 b, uint256 m) internal pure returns (uint256 r) {
assembly ("memory-safe") {
r := addmod(a, b, m)
}
}
function unsafeDivUp(uint256 n, uint256 d) internal pure returns (uint256 r) {
assembly ("memory-safe") {
r := add(gt(mod(n, d), 0x00), div(n, d))
}
}
}
library Math_0 {
function inc(uint256 x, bool c) internal pure returns (uint256 r) {
assembly ("memory-safe") {
r := add(x, c)
}
if (r < x) {
Panic.panic(Panic.ARITHMETIC_OVERFLOW);
}
}
function dec(uint256 x, bool c) internal pure returns (uint256 r) {
assembly ("memory-safe") {
r := sub(x, c)
}
if (r > x) {
Panic.panic(Panic.ARITHMETIC_OVERFLOW);
}
}
}
// src/vendor/SafeTransferLib.sol
/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Modified from Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
/*//////////////////////////////////////////////////////////////
ETH OPERATIONS
//////////////////////////////////////////////////////////////*/
function safeTransferETH(address payable to, uint256 amount) internal {
assembly ("memory-safe") {
// Transfer the ETH and revert if it fails.
if iszero(call(gas(), to, amount, 0x00, 0x00, 0x00, 0x00)) {
let ptr := mload(0x40)
returndatacopy(ptr, 0x00, returndatasize())
revert(ptr, returndatasize())
}
}
}
/*//////////////////////////////////////////////////////////////
ERC20 OPERATIONS
//////////////////////////////////////////////////////////////*/
function fastBalanceOf(IERC20 token, address acct) internal view returns (uint256 r) {
assembly ("memory-safe") {
mstore(0x14, acct) // Store the `acct` argument.
mstore(0x00, 0x70a08231000000000000000000000000) // Selector for `balanceOf(address)`, with `acct`'s padding.
// Call and check for revert. Storing the selector with padding in
// memory at 0 results in a start of calldata at offset 16. Calldata
// is 36 bytes long (4 bytes selector, 32 bytes argument)
if iszero(staticcall(gas(), token, 0x10, 0x24, 0x00, 0x20)) {
let ptr := mload(0x40)
returndatacopy(ptr, 0x00, returndatasize())
revert(ptr, returndatasize())
}
// Check for short returndata and missing code
if iszero(lt(0x1f, returndatasize())) { revert(0x00, 0x00) }
r := mload(0x00)
}
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {
assembly ("memory-safe") {
let ptr := mload(0x40) // Cache the free memory pointer.
mstore(0x60, amount) // Store the `amount` argument.
mstore(0x40, to) // Store the `to` argument.
mstore(0x2c, shl(0x60, from)) // Store the `from` argument. (Clears `to`'s padding.)
mstore(0x0c, 0x23b872dd000000000000000000000000) // Selector for `transferFrom(address,address,uint256)`, with `from`'s padding.
// Calldata starts at offset 28 and is 100 bytes long (3 * 32 + 4).
// If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.
if iszero(call(gas(), token, 0x00, 0x1c, 0x64, 0x00, 0x20)) {
returndatacopy(ptr, 0x00, returndatasize())
revert(ptr, returndatasize())
}
// We check that the call either returned exactly 1 [true] (can't just be non-zero
// data), or had no return data.
if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {
mstore(0x00, 0x7939f424) // Selector for `TransferFromFailed()`
revert(0x1c, 0x04)
}
mstore(0x60, 0x00) // Restore the zero slot to zero.
mstore(0x40, ptr) // Restore the free memory pointer.
}
}
function safeTransfer(IERC20 token, address to, uint256 amount) internal {
assembly ("memory-safe") {
mstore(0x14, to) // Store the `to` argument.
mstore(0x34, amount) // Store the `amount` argument.
// Storing `amount` clobbers the upper bits of the free memory pointer, but those bits
// can never be set without running into an OOG, so it's safe. We'll restore them to
// zero at the end.
mstore(0x00, 0xa9059cbb000000000000000000000000) // Selector for `transfer(address,uint256)`, with `to`'s padding.
// Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4).
// If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.
if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) {
let ptr := and(0xffffffffffffffffffffffff, mload(0x40))
returndatacopy(ptr, 0x00, returndatasize())
revert(ptr, returndatasize())
}
// We check that the call either returned exactly 1 [true] (can't just be non-zero
// data), or had no return data.
if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {
mstore(0x00, 0x90b8ec18) // Selector for `TransferFailed()`
revert(0x1c, 0x04)
}
mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten.
}
}
function safeApprove(IERC20 token, address to, uint256 amount) internal {
assembly ("memory-safe") {
mstore(0x14, to) // Store the `to` argument.
mstore(0x34, amount) // Store the `amount` argument.
// Storing `amount` clobbers the upper bits of the free memory pointer, but those bits
// can never be set without running into an OOG, so it's safe. We'll restore them to
// zero at the end.
mstore(0x00, 0x095ea7b3000000000000000000000000) // Selector for `approve(address,uint256)`, with `to`'s padding.
// Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4).
// If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.
if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) {
let ptr := and(0xffffffffffffffffffffffff, mload(0x40))
returndatacopy(ptr, 0x00, returndatasize())
revert(ptr, returndatasize())
}
// We check that the call either returned exactly 1 [true] (can't just be non-zero
// data), or had no return data.
if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {
mstore(0x00, 0x3e3f8f73) // Selector for `ApproveFailed()`
revert(0x1c, 0x04)
}
mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten.
}
}
function safeApproveIfBelow(IERC20 token, address spender, uint256 amount) internal {
uint256 allowance = token.allowance(address(this), spender);
if (allowance < amount) {
if (allowance != 0) {
safeApprove(token, spender, 0);
}
safeApprove(token, spender, type(uint256).max);
}
}
}
// src/ISettlerActions.sol
interface ISettlerActions {
/// @dev Transfer funds from msg.sender Permit2.
function TRANSFER_FROM(address recipient, ISignatureTransfer.PermitTransferFrom memory permit, bytes memory sig)
external;
/// @dev Transfer funds from metatransaction requestor into the Settler contract using Permit2. Only for use in `Settler.executeMetaTxn` where the signature is provided as calldata
function METATXN_TRANSFER_FROM(address recipient, ISignatureTransfer.PermitTransferFrom memory permit) external;
/// @dev Settle an RfqOrder between maker and taker transfering funds directly between the parties
// Post-req: Payout if recipient != taker
function RFQ_VIP(
address recipient,
ISignatureTransfer.PermitTransferFrom memory makerPermit,
address maker,
bytes memory makerSig,
ISignatureTransfer.PermitTransferFrom memory takerPermit,
bytes memory takerSig
) external;
/// @dev Settle an RfqOrder between maker and taker transfering funds directly between the parties for the entire amount
function METATXN_RFQ_VIP(
address recipient,
ISignatureTransfer.PermitTransferFrom memory makerPermit,
address maker,
bytes memory makerSig,
ISignatureTransfer.PermitTransferFrom memory takerPermit
) external;
/// @dev Settle an RfqOrder between Maker and Settler. Transfering funds from the Settler contract to maker.
/// Retaining funds in the settler contract.
// Pre-req: Funded
// Post-req: Payout
function RFQ(
address recipient,
ISignatureTransfer.PermitTransferFrom memory permit,
address maker,
bytes memory makerSig,
address takerToken,
uint256 maxTakerAmount
) external;
function UNISWAPV4(
address recipient,
address sellToken,
uint256 bps,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
uint256 amountOutMin
) external;
function UNISWAPV4_VIP(
address recipient,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
ISignatureTransfer.PermitTransferFrom memory permit,
bytes memory sig,
uint256 amountOutMin
) external;
function METATXN_UNISWAPV4_VIP(
address recipient,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
ISignatureTransfer.PermitTransferFrom memory permit,
uint256 amountOutMin
) external;
function BALANCERV3(
address recipient,
address sellToken,
uint256 bps,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
uint256 amountOutMin
) external;
function BALANCERV3_VIP(
address recipient,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
ISignatureTransfer.PermitTransferFrom memory permit,
bytes memory sig,
uint256 amountOutMin
) external;
function METATXN_BALANCERV3_VIP(
address recipient,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
ISignatureTransfer.PermitTransferFrom memory permit,
uint256 amountOutMin
) external;
function PANCAKE_INFINITY(
address recipient,
address sellToken,
uint256 bps,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
uint256 amountOutMin
) external;
function PANCAKE_INFINITY_VIP(
address recipient,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
ISignatureTransfer.PermitTransferFrom memory permit,
bytes memory sig,
uint256 amountOutMin
) external;
function METATXN_PANCAKE_INFINITY_VIP(
address recipient,
bool feeOnTransfer,
uint256 hashMul,
uint256 hashMod,
bytes memory fills,
ISignatureTransfer.PermitTransferFrom memory permit,
uint256 amountOutMin
) external;
/// @dev Trades against UniswapV3 using the contracts balance for funding
// Pre-req: Funded
// Post-req: Payout
function UNISWAPV3(add...
// [truncated — 369098 bytes total]
Read Contract
balanceOf 0x70a08231
rebateClaimer 0x67c4a3b0 → address
Write Contract 1 functions
These functions modify contract state and require a wallet transaction to execute.
execute 0xd2f84ab6
tuple slippage
bytes[] actions
bytes32
returns: bool
Token Balances (2)
View Transfers →Recent Transactions
No transactions found for this address