Address Contract Partially Verified
Address
0x13AE7caFFd0D83ac90C985F68c7dACc7c69f7b6B
Balance
0 ETH
Nonce
1
Code Size
21573 bytes
Creator
0x9C17D17D...b4f6 at tx 0x426c37c8...9d6a56
Indexed Transactions
0 (1 on-chain, 0.8% indexed)
Contract Bytecode
21573 bytes
0x60a0806040526004361015611750575b50361561174e5734610188576f07f49fa1cdccd5c65a7d4860ce3abbe9805c9081331860601b825f351860e01c17610188575f905d366004116101885760031936019060a01c61ffff16806005146111035780600114610fcc57806003146109b85780600414610270578060021461019c5760061461009c57634e487b7160e01b5f52605160045260245ffd5b60243560443580926060105f1461018c575060c435906040516100be81611b76565b338152836020820152602319360191608083126101885760408051936100e385611bc2565b1261018857604051906100f582611b76565b6001600160a01b038116810361018857815284602082015282526064356020830152608435604083015261012883611c39565b906101366040519283611c16565b838252368460e40111610188575f60208561015e9660e4838701378401015260a435926148ea565b6040519060608252602082810152602082604001528160600152806080016040525b602081519101f35b5f80fd5b61019791339061422b565b61015e565b5060801161018857600435604435602481013560601c915f81135f1461026657905b3083036101ec576101d8925060383391013560601c61422b565b6040516101e481611bfa565b5f8152610180565b906101fa610261931561483a565b6040519061020782611b76565b338252602082015261021c36602c8401611ca9565b9061025b608d84013560011693369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff778260040135019101611c55565b916148ea565b6101d8565b50602435906101be565b50506024356058359060783590605819810190609d905f6040516080525f60805160c00152610300386101e060805101396104e0608051016040526102cc8560801c876001600160801b0316853560601c60805160c0016153e5565b92836080515283608051602001528360805160400152866001600160801b0316608051608001528560801c60805160a001523694369373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b035f976020015116145f14610930575061033e3060893560601c1461483a565b6080516040015161271061ffff843560501c16470204905260151901906016015b62ffffff82116108f057608051604001513060893560601c03610924575b87600160781b16610902575b516080516060015261039c608051614f50565b906103a5614ae2565b906103ae614ac4565b60208210156106745750505050608051604001519384602001519451956103dd6080515160805160c001615329565b6080516020015180511561065f575b5060805160c00151801580156105de575b505060805151978860200151985198818a9260801c83106105d557509061042a9160443560601c90615167565b600160781b161561051c5750505050811590811561046d575b5050505b604051906060825260208281015260208260400152816060015280608001604052610180565b60893560601c30036105045730905b60601b916104e757604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af1156104df575f6060526040525f8080610443565b3d5f823e3d90fd5b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6fc824a45acd1e9517bb0cb8d0d5cde8935c9061047c565b90919293608051606001519580870396146105b9576001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036105a25750505050505f6014526fa58411940000000000000000000000005f525f806024601082335af115610597575f6004601c6020936311da60b48452335af1610447575b6040513d5f823e3d90fd5b946105b39560893560601c90615257565b50610447565b6014526ffb772a880000000000000000000000005f5260246010fd5b60801c90614208565b61064b5760e0608051015160805160400151810361062a575b5060015b818110156103fd5760019061062460e06080518360051b01015180602001519051903090615167565b016105fb565b602081015190516106459130906001600160a01b0316615167565b5f6105f7565b634e487b7160e01b5f52603260045260245ffd5b61066e9060805160c001615329565b5f6103ec565b833560f01c93600292600119019083019060805160c001916080519261069993614f6d565b906080516020015160200151906080515160200151928260601b958460601b9373777777777777777777777777777777777777777760611b956001600160a01b0316906001600160a01b031690858910868814151689881417828218028092186001600160a01b031660208b0152186001600160a01b031688528235908160e81c60408a01528160d01c62ffffff16900b606089015260301c6001600160a01b031660808801527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60190601a01906107849091803560e81c6002198160038185820195010195030192565b91969298908762ffffff106108f0576020926127105f93878710888a141516878a141715158a526080518601515102048303848901526001600160a01b0386861087891415168689141773fffd8963efd1fc6a506488495d951d53639afb810273fffd8963efd1fc6a506488495d951d5263988d2518166040890152806040519263f3cd914c84528b518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028487015260808c8701856040015e60608a8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610597575f5190600f9180830b92608051602001519384519485878610888a141516868a14178560801d850b84180283188101116108dc57608093841d90920b8181188886149888141597909510969096169690961792909202948518909201905251518051909290916108d49184911861508e565b0190526103ae565b634e487b7160e01b5f52601160045260245ffd5b634e487b715f5260326020526024601cfd5b61091d8686868a856020015186519060893560601c90615257565b8152610389565b6020870135815261037d565b60893560601c30036109735750601519823560501c92601601910191612710608051604001519161ffff6109683085602001516141d4565b91160204905261035f565b9550505050505061098960893560601c1561483a565b60919060f235600116604182013560e81c809203906041820191610112908382116101885760d019019061035f565b5050601435603435605819360160595f91604051925f8460c00152610300386101e08601396104e08401604052610a048560801c876001600160801b0316853560601c8760c0016153e5565b92838552838560200152838560400152866001600160801b031685608001528560801c8560a001523690369373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b035f976020015116145f14610f4857610a6b3060453560601c1461483a565b604087015161271061ffff843560501c16470204905260151901906016015b62ffffff82116108f05786604001513060453560601c03610f3c575b88600160781b16610f1a575b518760600152610ac187614f50565b90610aca614ae2565b9160405190610ad882611ba6565b5f82525f60208301525f60408301525f60608301525f60808301525f60a0830152606060c08301525b6003831015610cf657505050508460400151948560200151955196610b2a82518360c001615329565b8160200151805115610ce3575b508160c0015180158015610c7c575b50508151988960200151995199818b9260801c83106105d5575090610b70915f3560601c90615108565b600160781b1615610c315750505050508115908115610ba7575b5050505b6040519060208252816020015280604001604052610180565b60453560601c3003610c195730905b60601b916104e757604051926060526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af1156104df575f6060526040525f8080610b8a565b6fc824a45acd1e9517bb0cb8d0d5cde8935c90610bb6565b6060979697959192939495015196808814610c5f57610c599697039060453560601c906151c6565b50610b8e565b506014526ffb772a880000000000000000000000005f5260246010fd5b61064b5760e083015183604001518103610cc2575b5060015b81811015610b465780610cbc60e08660019460051b01015180602001519051903090615108565b01610c95565b60208101519051610cdd9130906001600160a01b0316615108565b5f610c91565b610cf0908360c001615329565b5f610b37565b80600119610d12923560f01c9401906002018a60c0018b614f6d565b92838261c0008316610e5757505081612710610db292610dbe943560601c86602001526001600160a01b038d60200151602001511660408701526001600160a01b038d51602001511660608701528c6020015151020460808501527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec604051950190601401919091803560e81c6002198160038185820195010195030192565b95929391953691611c55565b60c084015262ffffff84116108f057604051603f1984015190601f1985015190632bfb780c603f198701526020601f1987015260605f60448860c00151898151910390818b60c001520101602319890182335af1156104df576020519160405193603f19880152601f198701526040528b60200151908151039052610e468b519182516142a3565b905260608360c00152604052610b01565b92509362ffffff106108f057613fff816140006127109316155f14610ef7575f60208801526001600160a01b038c51602001511660408801525b168a602001515102046060850152604051601f19850151906343583be5601f1987015260605f60a4600319890182335af1156104df576020519060405192601f198801526040528a60200151908151039052610ef08a519182516142a3565b9052610b01565b600160208801526001600160a01b038c6020015160200151166040880152610e91565b610f3587878787856020015186519060453560601c906151c6565b8152610ab2565b60208401358152610aa6565b60453560601c3003610f8857601519823560501c9260160191019161271088604001519161ffff610f7d3085602001516141d4565b911602049052610a8a565b505050505050610f9d60453560601c1561483a565b604d60ae35600116600219908136013560e81c928336039283019260ce908482116101885760d0190190610a8a565b5060a011610188576084357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f81019060a435906001600160a01b038083168084036101885761101f91600435161461483a565b60405161102b81611b76565b33815260243560208201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5c3601926080841261018857604080519461107086611bc2565b12610188576040519061108282611b76565b815260c4356020820152835260e43560208401526101043560408401526110a884611c39565b916110b66040519384611c16565b8483523660a4820111610188577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9f5f916101d89661012560208701378401015261010535600116926148ea565b5050604435607835906098359060581981019060bd905f604051935f8560c00152610300386101e08701396104e085016040526111558660801c886001600160801b0316863560601c8860c0016153e5565b93848652848660200152848660400152876001600160801b031686608001528660801c8660a001523691369473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b035f986020015116145f146116c857506111bd3060a93560601c1461483a565b604087015161271061ffff843560501c16470204905260151901906016015b62ffffff82116108f05786604001513060a93560601c036116bc575b88600160781b1661169a575b8051607f1c6115ba5751876060015261121c87614f50565b90611225614ac4565b915b602382101561140b57505050846040015194856020015195519661124f82518360c001615329565b81602001518051156113f8575b508160c001518015801561138a575b50508151988960200151995199818b9260801c83106105d55750906112969160643560601c906150a9565b600160781b161561136257505050505081159081156112d857505050604051906060825260208281015260208260400152816060015280608001604052610180565b60a93560601c300361134a5730905b60601b916104e757604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af1156104df575f6060526040525f8080610443565b6fc824a45acd1e9517bb0cb8d0d5cde8935c906112e7565b6060979697959192939495015196808814610c5f576105b39697039060a93560601c90614e27565b61064b5760e0830151836040015181036113d7575b5060019060015b8181106113b3575061126b565b806113d160e087869460051b010151806020015190519030906150a9565b016113a6565b602081015190516113f29130906001600160a01b03166150a9565b5f61139f565b611405908360c001615329565b5f61125c565b80600119611427923560f01c9301906002018960c0018a614f6d565b9091886020015190815191602001518a5160200151908060601b936001600160a01b038360601b93818073777777777777777777777777777777777777777760611b951691169082888710898714151687871417838318028093181660208c015218168852601f198760200196019635604089015262ffffff87116108f05760405f67400065a8177fae276bffff9a58c9f7f0ae8d3e0684858714868a14158a8910161702186bffffffffffffffffffffffff1661800087166115cc57825182815260e4916020820160608e825e80518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415029052612710617fff8a1687020482608001528988108a88141516888814178260a001528160c00152828160e00152601c0182335af11561059757617fff61157f8e96612710945f519660205197925b80821090831415169114178682180280961897602001519586911861508e565b93805190858203905284119416020410176115ba578851908151905f81136115ab575f03019052611227565b602483633351b2608152601c01fd5b634e487b715f5260116020526024601cfd5b82516f101e895200000000000000000000000081526101049160148d8601602084015e6034820160608e825e80518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415029052612710617fff8a1687020482609401528988108a88141516888814178260b401528160d40152828160f4015260100182335af115610597575f5192602051600f8180820b188680830b181790612710617fff891686020490612710617fff8a16870204900b183d6040111717610188578e9661271094617fff9361157f93979261155f565b6116b587878787856020015186519060a93560601c90614e27565b8152611204565b602084013581526111f8565b60a93560601c30036117095750601519823560501c9260160191019161271088604001519161ffff6116fe3085602001516141d4565b9116020490526111dc565b9550505050505061171f60a93560601c1561483a565b60b161011235600116606183013560e81c809303916061830192610132908482116101885760d01901906111dc565b005b5f3560e01c90816367c4a3b014611b29575063fd3ad6d414611772575f61000f565b3461018857600319360160e08112610188576060136101885767ffffffffffffffff80606435116101885736602360643501121561018857806064356004013511610188573660246064356004013560051b606435010111610188576001600160a01b0360a4351660a43503610188578060c435116101885736602360c4350112156101885760c43560040135116101885736602460c4356004013560c4350101116101885760405160246064350190805b60246064356004013560051b60643501018310611b065760a0826064356004013560051b9020604051907f615e8d716cef7295e75dd3f1f10d679914ad6d7759e8e9459f0109ef7524170182526060600483602001378160800152206fe44a235ac7aebfbc05485e093720deaa5c80611af657506fe44a235ac7aebfbc05485e093720deaa5d6001600160a01b0360a4351615611ae9576fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b038116611acd5760a4356001600160a01b03166fc824a45acd1e9517bb0cb8d0d5cde8935d60643560040135156101885760246064350135606435016024810135604482013590604860031982019301926040519361194460c43560040135602460c4350184848860e01c611d67565b8560405215611a7f5760015b6064356004013581106119e357611965612252565b6001600160a01b0360a435166001600160a01b036fc824a45acd1e9517bb0cb8d0d5cde8935c16036119d6575f6fc824a45acd1e9517bb0cb8d0d5cde8935d6fe44a235ac7aebfbc05485e093720deaa5c806119c657602060405160018152f35b63e25527c25f526020526024601cfd5b635149e7955f526004601cfd5b60246064358260051b0101356064350190602482013560448301359260486003198301910160405194611a1a83838360e01c612aac565b8660405215611a3157505050506001915001611950565b7fffffffff0000000000000000000000000000000000000000000000000000000090608095633c74eed68852876020015216856040015260608581015281858501528460a001370190601c01fd5b7fffffffff00000000000000000000000000000000000000000000000000000000608094633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b6014526f7407c0f80000000000000000000000005f5260246010fd5b63e758b8d55f526004601cfd5b639936cbab5f526020526024601cfd5b604460643584350160248101359182910183378120815260209283019201611824565b34610188575f600319360112610188578073352650ac2653508d946c4912b07895b22edd84cd60209252f35b35906001600160a01b038216820361018857565b3590811515820361018857565b6040810190811067ffffffffffffffff821117611b9257604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff821117611b9257604052565b6060810190811067ffffffffffffffff821117611b9257604052565b6080810190811067ffffffffffffffff821117611b9257604052565b6020810190811067ffffffffffffffff821117611b9257604052565b90601f601f19910116810190811067ffffffffffffffff821117611b9257604052565b67ffffffffffffffff8111611b9257601f01601f191660200190565b929192611c6182611c39565b91611c6f6040519384611c16565b829481845281830111610188578281602093845f960137010152565b9080601f8301121561018857816020611ca693359101611c55565b90565b8092910391608083126101885760405190611cc382611bc2565b60408294126101885760606040918251611cdc81611b76565b611ce582611b55565b81526020820135602082015284528281013560208501520135910152565b6101408183031261018857611d1781611b55565b92611d2460208301611b69565b92604083013592606081013592608082013567ffffffffffffffff811161018857611d61611d5785610120938601611c8b565b9460a08501611ca9565b92013590565b9392919093611d7984848488856122f0565b15611d88575050505050600190565b63fe944a9d8103611dd95750611dcd926001600160a01b0392611db486611dc694611dd2980190611d03565b99929598919690979493943691611c55565b96166142f0565b61452c565b505b600190565b63fb17ae478103611e2d5750611e1263ffffffff92611e0186611e2294611dd2980190611d03565b9791949690959a9392933691611c55565b946001600160a01b038a166142f0565b9160801c16906144a7565b638d624361810361212257508301926101008185031261018857611e5081611b55565b91602091604093611e6f611e65868401611b69565b9760608401611ca9565b9560e083013596611f8e866055611e916001600160a01b039889963691611c55565b967fbb7b783eb4b8ca46925c5384a6b9919df57cb83da8f76e37291f58d0dd5c439a60e18c730a7e848aca42d879ef06507fca0e7b33a0a63c1e8151809c838b51838b015e838b8a01836060015e5f8260a00153805180918a018360a1015e806081018252019160a18301809152528560ac82019460ff8653013560c1820152015220925101518a1561211757637fffffff5b895191611f3083611bde565b82528b1515898301525f8a83015260030b6060820152611f808951968792868b8501987f3eece7db000000000000000000000000000000000000000000000000000000008a5216602485016129c8565b03601f198101865285611c16565b16926fc824a45acd1e9517bb0cb8d0d5cde8935c168314611ae9576f07f49fa1cdccd5c65a7d4860ce3abbe991825c8061210857505f9182917f67ca7c91000000000000000100000000000000000000000000000000000000008617855d519082865af190611ffb614669565b9115612100575c806120f1575080838061201a93518301019101612a12565b95905084861061202f57505050505050600190565b600492918291156120b1578451938480927f5f64b55b0000000000000000000000000000000000000000000000000000000082525afa9283156120a857505f9261207b575b5050614208565b61209a9250803d106120a1575b6120928183611c16565b810190612a28565b8380612074565b503d612088565b513d5f823e3d90fd5b8451938480927f0fc63d100000000000000000000000000000000000000000000000000000000082525afa9283156120a857505f9261207b575050614208565b8363d66fcc385f52526024601cfd5b508281519101fd5b8563ab7646c45f52526024601cfd5b637fffffff19611f24565b91939163c4d55cad0361224a578161213f9161214e930190611d03565b94969195929890973691611c55565b926f7fffffffffffffffffffffffffffffff81116115ba57826060810204606014831517156108dc57876060810204606014881517156108dc576001600160801b038060608502116115ba5760608902116115ba5760606001600160a01b039381611dd29a604080519b8a51998d81519c8d928d6101329285610115868401820101526020018484015e602001918d01015e6101358d8b018c010182525f8d6101310153816020820160f18f015e518c60b1015e5f8b609d01520289608801520287607801528660680152168460580152018060d10183604401526020836024015263f83d08ba83600401526101150182528160a801536143e3565b505050505f90565b6001600160a01b039060043582811690818103610188576024359384169182850361018857604435928315806122e8575b6122e05773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036122c1575047918083106122b957506122b7929350614294565b565b905083614208565b90506122cd30856141d4565b918083106122b957506122b7929361422b565b505050509050565b508015612283565b9391909293630dfeb41981145f14612509575082019260a0838503126101885761234861232a61231f85611b55565b956020809601611ca9565b9161233f6001600160a01b03809716846142b0565b50933691611c55565b926fe44a235ac7aebfbc05485e093720deaa925f845c945d8315611ae9575f9485946fc824a45acd1e9517bb0cb8d0d5cde8935c6040988980519561238c87611bde565b605b875261248b6046898901987f536c697070616765416e64416374696f6e7328616464726573732072656369708a527f69656e742c6164647265737320627579546f6b656e2c75696e74323536206d69858201527f6e416d6f756e744f75742c62797465735b5d20616374696f6e7329000000000060608201528a612410614855565b86519b8c937f536c697070616765416e64416374696f6e7320736c697070616765416e644163848601527f74696f6e73290000000000000000000000000000000000000000000000000000898601525180918686015e8301908482015f8152815193849201905e018d8382015203602681018a520188611c16565b8180519963137c29fe8b528181518c8c015e89018a6060015e8860a0015e168560e001528461010001526101408085610120015282519261016091868584019101528584860192015e805180930190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af1156120a85750600190565b93949193639ebf8e8d0361299a57820160e0838203126101885761252c83611b55565b9460208401359067ffffffffffffffff82116101885761255e61255484612566948801611c8b565b9360408701611ca9565b953691611c55565b805160890194856089116108dc57602091601f1961259c61258689611c39565b986125946040519a8b611c16565b808a52611c39565b013684890137815183015187604801526040828401886068015e5f8760a8015380519083018760a9015e51015190945f907f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116115ba5795915b825190602c82106108f057866014850151601586015194601887015190602c8801519483869087996001600160a01b0389166001600160a01b038816101561298f575b60ff81811680612861575050506001600160a01b03916126bb91731f98431c8ad98523631ae4a59f267346ea31f9847fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33985b62ffffff16906040519387165f528616602052806040521560051b6060035f2091604052614628565b1691855190858760280152866014015285528c602c88115f146127e657506127416001600160a01b039387859461273c6127509561272e6040519b8c9586938d8c8084169116105f146127c8578d8c806401000276a4945b630251596160e31b60208a01521691161030602487016148b4565b03601f198101845283611c16565b6145b2565b60208082518301019101612a12565b9590946040525b16911610156127c157505b5f03915f83126115ba57602c8392111561279c57505030909160188151106108f057805160171901601890910190815260288652916125f7565b949396509450505060c081013583106127b757505050600190565b60c0013590614208565b9050612762565b8d8c8073fffd8963efd1fc6a506488495d951d5263988d2594612713565b926001600160a01b0361283d9361273c8961272e849b9a8a61274198879b888616898416105f1461284557886401000276a4935b816040519b8c99630251596160e31b60208c0152169116109116602487016148b4565b949093612757565b8873fffd8963efd1fc6a506488495d951d5263988d259361281a565b600181036128bb575050506001600160a01b03916126bb917341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c97f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7598612692565b60028103612915575050506001600160a01b03916126bb9173baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f7fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3398612692565b600391929394959697989950145f1461297e5750506126bb8d96959493926001600160a01b03927370fe4a44ea505cfa3a57b95cf2862d4fd5f0f6877fe9b68c5f77858eecac2e651646e208175e9b1359d68d0e14fc69f8c54e5010bf92633a1c453c98612692565b63d3b1276d5f52166020526024601cfd5b86925088915061263a565b50925050505f90565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b6060611ca694936001600160a01b0360c094168352805160208401526020810151151560408401526040810151151582840152015160030b60808201528160a082015201906129a3565b9190826040910312610188576020825192015190565b9081602091031261018857516001600160a01b03811681036101885790565b91906101008382031261018857612a5d83611b55565b92612a6a60208201611b55565b92604082013592612a7d60608401611b69565b9260808101359260a08201359260c083013567ffffffffffffffff81116101885760e091611d61918501611c8b565b9092919063d92aadfb8103612dee5750820161012090818482031261018857612ad484611b55565b90602094612ae482878301611ca9565b90612af160a08201611b55565b9260c082013567ffffffffffffffff811161018857820190612b1291611c8b565b612b1e60e08301611b55565b9561010080930135936001600160a01b03808097169716612b3f90826142b0565b8b8884959395515116968a60409c8d998a5190612b5b82611bde565b81528481018690528a810183905260016060820152601f190180517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa825260a0822091528a51909c6fc824a45acd1e9517bb0cb8d0d5cde8935c612bbe83611bde565b83821683528683018e9052168b82015260016060820152601f190180517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa825260a0822091529a8b95612c1130846141d4565b82811181841802189182612c2492614db7565b9d8e868b0152612c339261422b565b88805197612c4089611bde565b605889527f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e74858a019081527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c838b01527f626f6f6c207061727469616c46696c6c416c6c6f77656429000000000000000060608b01529885612cc0614855565b84519b8c938385017f436f6e73696465726174696f6e20636f6e73696465726174696f6e29000000009052518091603c86015e830190603c82015f8152815193849201905e01603c81015f905203601c81018a52603c01612d21908a611c16565b81519a8b98899663137c29fe88528282518983015e01866060015e8460a0015e8260e0015201526101409182910152815191610160918584840191015284838c0192015e815191828a0190828501610180015e016101840190601c015a915f9291836e22d473030f116ddee9f6b43ac78ba38194f115612de4576001600160801b039394957f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f5252835190845260605f209352166010525f5260305fa0600190565b83513d5f823e3d90fd5b9283638d68a156829495145f1461321b5750019060808183031261018857612e1581611b55565b9160408201359067ffffffffffffffff821161018857612e36918301611c8b565b90612710612e9083516020850151907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000918281169160148110613206575b50509050612e8b602085013591309060601c6141d4565b6142dd565b049360405193612e9f85611bc2565b60288552604036602087013730937f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff879197116115ba57935b8651602c81106108f0576014880151958760158a01519760188b0194855190602c8d015194838690879d6001600160a01b0389166001600160a01b03881610156131fb575b60ff818116806130de575050506001600160a01b0391612f9d91731f98431c8ad98523631ae4a59f267346ea31f9847fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e339862ffffff16906040519387165f528616602052806040521560051b6060035f2091604052614628565b16918551908587602801528660140152855288602c88115f1461308057506127416001600160a01b039387859461273c61300e9561272e6040519b8c9586938d8c8084169116105f146127c857630251596160e31b60208601526401000276a4918c168c8f161030602487016148b4565b9590946040525b169116101561307957505b5f03955f87126115ba57602c8792111561305457505030949660188151106108f05751601719018152602886529593612ed8565b95509550505093506060810135831061306f57505050600190565b6060013590614208565b9050613020565b926001600160a01b036130d69361273c8961272e849b9a8a61274198879b888616898416105f1461284557886401000276a493816040519b8c99630251596160e31b60208c0152169116109116602487016148b4565b949093613015565b60018103613138575050506001600160a01b0391612f9d917341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c97f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7598612692565b60028103613192575050506001600160a01b0391612f9d9173baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f7fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3398612692565b600391929394959697989950145f1461297e575050612f9d8e96959493926001600160a01b03927370fe4a44ea505cfa3a57b95cf2862d4fd5f0f6877fe9b68c5f77858eecac2e651646e208175e9b1359d68d0e14fc69f8c54e5010bf92633a1c453c98612692565b869250889150612f1d565b8391925060140360031b1b1616805f80612e74565b63103b48be81036134bb575060c091810103126101885761323b81611b55565b602091613249838201611b55565b906040908181013561325d60608301611b55565b60808301359262ffffff841684036101885760a00135956001600160a01b03808097169216926001918280871614935f92806134a2575b50875193908361346c575b630902f1ac5f52885f6004601c8a5afa1561346257883d10610188578b978a948760051b9d8e93845194821851958085811c1614831517613412575b50506127109160081c61ffff16820302920282019102049963022c0d9f8452608084016080905260a084015f90528a87828601015260040186188301601c015f9052166060820152601c01825a5f9283809360a493f115612de4578587106133495750505050505050600190565b600492918291156133b4578451938480927fd21220a70000000000000000000000000000000000000000000000000000000082525afa9283156120a857505f92613397575b50505b16614208565b6133ad9250803d106120a1576120928183611c16565b848061338e565b8451938480927f0dfe16810000000000000000000000000000000000000000000000000000000082525afa9283156120a857505f926133f5575b5050613391565b61340b9250803d106120a1576120928183611c16565b84806133ee565b6024919394959697505f9250601c906370a0823184528b85525afa1561346257873d10610188575f518381106134515790838b9594939203895f6132db565b601189634e487b715f52526024601cfd5b88513d5f823e3d90fd5b63a9059cbb8552868c86015283898601528b5f6044601c880182855af11561346257815f51148c3d1015163d151761329f575f80fd5b6127109193506134b230856141d4565b0204915f613294565b6338c9c14781036135285750019060a081830312610188576134dc81611b55565b906134e960408201611b55565b90608081013567ffffffffffffffff811161018857611dd49461350d918301611c8b565b9260206001600160a01b036060840135941692013590614698565b63c876d21d81036135d95750606091810103126101885761354881611b55565b604061355660208401611b55565b920135916001600160a01b0391821691811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036135a857504791808311613595575b505050600190565b6135a0920390614294565b5f808061358d565b906135b330836141d4565b928084116135c5575b50505050600190565b6135d093039161422b565b5f8080806135bc565b905063af72634f810361361157506001600160a01b0361360283611dcd93611dd2950190612a47565b97909695919594929416614c8c565b829063bfda529281036138c95750608091810103126101885761363381611b55565b60209081830135926040936001600160a01b036060613653878501611b69565b930135931691156137eb57306014526f70a082310000000000000000000000005f52835f60246010736b175474e89094c44da98b954eedeac495271d0f5afa156137e1573d601f101561018857612710905f510204918451927ffae036d500000000000000000000000000000000000000000000000000000000845273f6e72db5454dd049d0788e411b06cfaf16853042938581600481885afa9081156137d7575f916137a2575b50670de0b6b3a7640000620f424091019102049080821061376a57505f80936044936010936034526014526f8d7ef9bb00000000000000000000000082525af1156137535750601f3d1115610188575f603452600190565b516bffffffffffffffffffffffff163d5f823e3d90fd5b9060545260345273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486014526f97a6f3b90000000000000000000000005f5260646010fd5b90508581813d83116137d0575b6137b98183611c16565b810103126101885751670de0b6b3a76400006136fb565b503d6137af565b87513d5f823e3d90fd5b84513d5f823e3d90fd5b93929193306014526f70a082310000000000000000000000005f52825f6024601073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485afa15612de4573d601f101561018857612710905f5102046034526014526f959912760000000000000000000000005f525f604460108273f6e72db5454dd049d0788e411b06cfaf168530425af1156137535750601f3d1115610188575f6034525f51818110613892575050600190565b605452603452736b175474e89094c44da98b954eedeac495271d0f6014526f97a6f3b90000000000000000000000005f5260646010fd5b905063fd8c38e181036139125750906138e491810190612a47565b926127108698979598939293116115ba57611dd29763ffffffff96611e22966001600160a01b038a16614c8c565b82906367848fe78103613bef575060c091810103126101885761393481611b55565b906020613942818301611b55565b9060409182840135936060810135916001600160a01b03908184168094036101885760a061397260808501611b69565b930135965f9080613bd8575b5080613bc557508361398f916141d4565b85517f1865c57d0000000000000000000000000000000000000000000000000000000081526101208082600481895afa918215613462579088949392915f92613ace575b50506001600160801b03809188875f14613ac6575051165b169003975b8315613abb57637fffffff5b835199613a088b611bde565b8a52841515878b01525f848b015260030b60608a0152613a638351613a2c81611bfa565b5f815284519a8b9485947f3eece7db00000000000000000000000000000000000000000000000000000000865216600485016129c8565b03815f865af19586156137e1575f96613a8a575b5084861061202f57505050505050600190565b613aab919650843d8611613ab4575b613aa38183611c16565b810190612a12565b9050945f613a77565b503d613a99565b637fffffff196139fc565b0151166139eb565b818096508193503d8311613bbe575b613ae78183611c16565b8101031261018857875193840184811067ffffffffffffffff821117611b92578852613b1281614647565b8452613b1f878201614647565b87850152613b2e88820161465b565b88850152613b3e6060820161465b565b6060850152608081015164ffffffffff8116810361018857608085015260a08101518060030b81036101885760a085015260c081015180151581036101885760c085015260e081015163ffffffff811681036101885760e0850152610100809101519060ff821682036101885784015286926001600160801b03806139d3565b503d613add565b97613bd3898689959461422b565b6139f0565b6127109150613be730846141d4565b02045f61397e565b9050636c5f9cf98103613ce1575090613c0a91810190612a47565b612710869793969892959498116115ba576f7fffffffffffffffffffffffffffffff81116115ba576060880297808904606014901517156108dc576060860295808704606014901517156108dc576001600160801b038089116115ba5786116115ba57611dd29760d3966001600160a01b039460405199885180996020018c8c015e8a60b301528960b101523089609d015288608801528760780152866068015216846058015281606f0184604401526020846024015263f83d08ba84600401528160b30184528360a801538201016040526143e3565b829063ca9e5d0f8103613e35575060c0918101031261018857613d0381611b55565b613d0f60208301611b55565b60408301356060840135936001600160a01b039182861693848703610188578360a0613d3d60808601611b69565b94013596169482613e14575b5050505f14613da257506014526fdd93f59a0000000000000000000000005f5260205f6024601082865af11561059757601f3d1115610188575f5191818310613d9457505050600190565b613d9d90614c57565b614208565b906014526fbd6015b40000000000000000000000005f5260205f6024601082875af11561059757601f3d1115610188575f5192828410613de55750505050600190565b5f6004601c60209363d4b9704684525afa1561059757601f3d1115610188575f518060a01c6101885716614208565b612710613e2d93613e2530856141d4565b02049161422b565b5f8080613d49565b63b8df6d4d141590506141ce578160a0918101031261018857613e5781611b55565b90602060409182810135906001600160a01b0382169485830361018857606090613ea6613e85838501611b69565b91612710876080870135960135613e9c30846141d4565b0204988991614b1d565b1561418f5782905f968651613eba81611ba6565b88815286810190898252888101908a8252848101928b845260808201908c825260a083018d815260c084019d8e5263ffa642255f526004958d5f88601c809d5afa1561418557603f3d1115610188578c5f888c8f83518551885289526317be952e84525afa1561418557601f9e8f3d1115610188575f518060081c6101885760ff166003811015614168575f8f918f8e908c92865263796da7af84525afa1561417b578f3d1115610188578d5f898f8e9083518b52637c9b8e8984525afa1561417b578f3d1115610188578d5f898f8e908351875263eab5d20e84525afa1561417b578f3d1115610188578d5f898f8e9083518c5263ec2fd46d84525afa1561417b578f3d1115610188575f5184528051600381101561416857614081575050505050613fe89150836152ef565b905b63c0ffa1785f52875f82878a5afa1561346257893d111561018857875f80519263ab44a7a38252878a5afa1561346257893d111561018857670de0b6b3a764000080915f510101910204938085106140765750925f9492859260849589519363e67ce7068552848a0152838a01528281015282826080015201915af1156120a857503d11611dd4575f80fd5b8490613d9d87614c57565b9492939451600381101561415557889594939291906001036140da57505090670de0b6b3a76400006140d2949592516ec097ce7bc90715b34b9f10000000000493519251958692519402049161535f565b900390613fea565b95519351905195519591945090920384830380881161413d575050858401938493516ec097ce7bc90715b34b9f1000000000049151670de0b6b3a76400008080978682970204028380820491061515018202049084030193030204020490613fea565b9150935061414e92915085036152ef565b0190613fea565b602188634e487b7160e01b5f525260245ffd5b602189634e487b7160e01b5f525260245ffd5b8e513d5f823e3d90fd5b8d513d5f823e3d90fd5b84955f9495916084949386935192638dae73338452838901528289015281810152818160800152601c01915af1156120a85750601f3d11611dd4575f80fd5b50505f90565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610597573d601f1015610188575f5190565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af11561427b573d153d601f1060015f511416171561426e575f603452565b6390b8ec185f526004601cfd5b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b5f80809381935af11561059757565b919082018092116108dc57565b90916020604051926142c184611b76565b818401935f85526001600160a01b038196169052510151809252565b818102929181159184041417156108dc57565b92909593949796916f7fffffffffffffffffffffffffffffff83116115ba57806060810204606014811517156108dc57816060810204606014821517156108dc576001600160801b038060608302116115ba5760608302116115ba5760608092604080519b8951988d81519b8c928c6101329285610115868401820101526020018484015e602001918c01015e6101358d8a018b010182525f8d6101310153816020820160f18f015e518c60b1015e5f8b609d015202896088015202876078015286606801528560580152018060d1018460440152602084602401526348c8949184600401526101150183528260a80153565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d444906fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b03168214611ae9576f07f49fa1cdccd5c65a7d4860ce3abbe991825c8061449757505f9182917fb45a3c0e0000000000000005e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d444855d82602083519301915af19061446e614669565b911561448e575c8061447e575090565b63d66fcc385f526020526024601cfd5b50602081519101fd5b63ab7646c45f526020526024601cfd5b73ba1333333333a1ba1108e8412f11850a5c319ba96fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b03168114611ae9576f07f49fa1cdccd5c65a7d4860ce3abbe992835c806144975750915f92917403ba1333333333a1ba1108e8412f11850a5c319ba9849360e01b17855d82602083519301915af19061446e614669565b6e04444c5dc75cb358380d2e3de08a90906fc824a45acd1e9517bb0cb8d0d5cde8935c6001600160a01b03168214611ae9576f07f49fa1cdccd5c65a7d4860ce3abbe991825c8061449757505f9182917f91dd73460000000000000004000000000004444c5dc75cb358380d2e3de08a90855d82602083519301915af19061446e614669565b6001600160a01b03809116906fc824a45acd1e9517bb0cb8d0d5cde8935c168114611ae9576f07f49fa1cdccd5c65a7d4860ce3abbe992835c8061449757509181740200000000000000000000000000000000000000005f9493859460e01b1717855d82602083519301915af19061446e614669565b9160406055938151908152600b81019360ff8553602082015201522090565b51906001600160801b038216820361018857565b51908160070b820361018857565b3d15614693573d9061467a82611c39565b916146886040519384611c16565b82523d5f602084013e565b606090565b9291906001600160a01b03808316946e22d473030f116ddee9f6b43ac78ba38614611ae9575f9181169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee82036147c5575050506146ed61271091476142dd565b04938051155f1461474957505061471f575f80809381935af161470e614669565b90156147175750565b602081519101fd5b60046040517f01da1572000000000000000000000000000000000000000000000000000000008152fd5b909392602083018084116108dc578251106108f057835f9460208695850101525b602083519301915af161477b614669565b901561471757511590816147bb575b5061479157565b60046040517f82d5d76a000000000000000000000000000000000000000000000000000000008152fd5b90503b155f61478a565b9091949282979497155f146147e45750505061471f575f92839261476a565b6147fc906147f7979496939730846141d4565b614d53565b602086018087116108dc578551106108f05787845f988360208b9a8a01015203614829575b50505061476a565b61483292614b1d565b5f8087614821565b1561484157565b634e487b7160e01b5f52600160045260245ffd5b6040519061486282611bc2565b602e82527f696e7432353620616d6f756e74290000000000000000000000000000000000006040837f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7560208201520152565b919360a093611ca696956001600160a01b03809416855215156020850152604084015216606082015281608082015201906129a3565b6fe44a235ac7aebfbc05485e093720deaa935f855c955d8415611ae9577f74696f6e732900000000000000000000000000000000000000000000000000006fc824a45acd1e9517bb0cb8d0d5cde8935c9460409687519361494a85611bde565b605b8552614a2b60468a60208881809a017f536c697070616765416e64416374696f6e73286164647265737320726563697081527f69656e742c6164647265737320627579546f6b656e2c75696e74323536206d69848301527f6e416d6f756e744f75742c62797465735b5d20616374696f6e7329000000000060608301526149d1614855565b9184519a8b957f536c697070616765416e64416374696f6e7320736c697070616765416e644163868801528601525180918686015e8301908482015f8152815193849201905e015f83820152036026810187520185611c16565b614ab7575f968888978180519863137c29fe8a528181518b8b015e8801896060015e8760a0015e6001600160a01b03168560e001528461010001526101408085610120015282519261016091868584019101528584860192015e805180930190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af1156120a85750565b631c500e5c5f526004601cfd5b60405190614ad182611bc2565b5f6040838281528260208201520152565b6040519060a0820182811067ffffffffffffffff821117611b92576040525f6080838281528260208201528260408201528260608201520152565b906001600160a01b036040519384917fdd62ed3e0000000000000000000000000000000000000000000000000000000083523060048401528084166024840152826044602097889388165afa918215610597575f92614c28575b508110614b85575b50505050565b614be0575b60105f80936044936014525f196034526f095ea7b300000000000000000000000082525af11561427b573d153d601f1060015f5114161715614bd3575f6034525f808080614b7f565b633e3f8f735f526004601cfd5b806014525f6034526f095ea7b30000000000000000000000005f52825f6044601082865af11561427b573d153d601f1060015f51141617614b8a57633e3f8f735f526004601cfd5b9091508481813d8311614c50575b614c408183611c16565b810103126101885751905f614b77565b503d614c36565b5f6004601c602093634a248d2a84525afa1561059757601f3d1115610188575f518060a01c610188576001600160a01b031690565b92939095949796919761271089116115ba576f7fffffffffffffffffffffffffffffff83116115ba576060820291808304606014901517156108dc576060810290808204606014901517156108dc576001600160801b038083116115ba5781116115ba5760d39660405199875180986020018c8b015e8a60b301528960b101523089609d0152886088015287607801528660680152856058015281606f018560440152602085602401526348c8949185600401528160b30185528460a80153830101604052565b5f198282098282029182808310920391808303916127109586910992828611156115ba5714614db1577fbc01a36e2eb1c432ca57a786c226809d495182a9930be0ded288ce703afb7e919350828211900360fc1b910360041c170290565b50500490565b915f198284098183850293848084109303950990808514614e1f5782805f0316809304600280826003021880830282030280830282030280830282030280830282030280830282030280920290030294600184805f0304019185841191030302920304170290565b505091500490565b94959091956001600160a01b039473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee868816145f14614e655750505050505050611ca68133614294565b60209596976040519889602401526f0c11dedd000000000000000000000000896010015288604401526044933003614f28575b50505080915084528301016040526fc824a45acd1e9517bb0cb8d0d5cde8935c163314611ae9576f07f49fa1cdccd5c65a7d4860ce3abbe990815c8061449757505f80917f599d0714000000000000000600000000000000000000000000000000000000003317845d60208151910182335af190614f14614669565b911561448e575c8061447e57506060015190565b829350604060c495810189606401378760a4015281878501528660e4013701805f8080614e98565b60400151805115614f5e5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c9182614f90575b50505050508101920390565b95839496614fd5945180604001805115615077575b5050818411614ffc575b50601491925001948360800151906001600160a01b038560a001519360581c16906153e5565b9081815260400151809114614fed5780808080614f84565b8063784cb7b860249252601c01fd5b85602001938451805115615067575b506002810361502657505060149192855190525b8291614faf565b6014935061503891925060031461483a565b858201359261506060159287608001516001600160a01b038960a001519260581c168b6153e5565b905261501f565b615071908a615329565b5f61500b565b898051850180825260051b01918252525f80614fa5565b905f821261509a575090565b80634c085bf160249252601c01fd5b60601b9082156104e757604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af1156104df575f606052604052565b60601b9082156104e757604051926060526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af1156104df575f606052604052565b60601b9082156104e757604051926060526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af1156104df575f606052604052565b919591949392906001600160a01b03163003615228575050505081615218575b6014526034526f15afd4090000000000000000000000005f5260205f6044601082335af11561427b575f515f60345290565b61522382338361422b565b6151e6565b61025b6152239461524f6040519361523f85611b76565b3385528960208601523690611ca9565b933691611c55565b93959290949194846014526fa58411940000000000000000000000005f525f806024601082335af115610597576001600160a01b031630036152be575050506152a29250339061422b565b6311da60b45f5260205f6004601c82335af115610597575f5190565b6152ea95949293509061524f61025b92604051946152db86611b76565b33865260208601523690611ca9565b6152a2565b61532490670de0b6b3a764000083516ec097ce7bc90715b34b9f1000000000049160206080860151950151920204838061535f565b900390565b90604001908151918261533b57505050565b5f905280515f198101825260051b01818103615355575050565b5180825260400152565b9190670de0b6b3a7640000928381860204029383039183828402049185040190818110155f146153db5703826001945b8360021b02048180020191600183811c01835b8482106153ca57505060011b93156153c357015b0290808204910615150190565b90036153b6565b909350838104840160011c906153a2565b9003825f9461538f565b919392610300916001600160a01b0316948509060191610120830192610140810190815190816101608582189201511702615431575081156154245752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd
Verified Source Code Partial Match
Compiler: v0.8.25+commit.b61c2a91
EVM: cancun
Optimization: Yes (2000 runs)
MainnetMetaTxnFlat.sol 8766 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 — 373947 bytes total]
Read Contract
rebateClaimer 0x67c4a3b0 → address
Write Contract 1 functions
These functions modify contract state and require a wallet transaction to execute.
executeMetaTxn 0xe7f9ee31
tuple slippage
bytes[] actions
bytes32
address msgSender
bytes sig
returns: bool
Token Balances (1)
View Transfers →Recent Transactions
This address has 1 on-chain transactions, but only 0.8% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →