0 txs
63.1k calls
constructor
constructor(address uniswapRouterV2, address uniswapRouterV3)
functions
HANDLER_GENERIC
viewfunction HANDLER_GENERIC() view returns (bytes32)
HANDLER_UNISWAP_V2
viewfunction HANDLER_UNISWAP_V2() view returns (bytes32)
HANDLER_UNISWAP_V3
viewfunction HANDLER_UNISWAP_V3() view returns (bytes32)
uniswapRouterV2
viewfunction uniswapRouterV2() view returns (address)
uniswapRouterV3
viewfunction uniswapRouterV3() view returns (address)
deposit
nonpayablefunction deposit(address token, address vault, uint256 amountMin, address account)
multicall
nonpayablefunction multicall(bytes[] calls)
repay
nonpayablefunction repay(address token, address vault, uint256 repayAmount, address account)
repayAndDeposit
nonpayablefunction repayAndDeposit(address token, address vault, uint256 repayAmount, address account)
swap
nonpayablefunction swap(tuple params)
sweep
nonpayablefunction sweep(address token, uint256 amountMin, address to)
events
No events.
errors
E_EmptyError
error E_EmptyError()
Swapper_Reentrancy
error Swapper_Reentrancy()
Swapper_SwapError
error Swapper_SwapError(address swapProvider, bytes rawError)
Swapper_TargetDebt
error Swapper_TargetDebt()
Swapper_UnknownHandler
error Swapper_UnknownHandler()
Swapper_UnknownMode
error Swapper_UnknownMode()
Swapper_UnsupportedMode
error Swapper_UnsupportedMode()
UniswapV2Handler_InvalidPath
error UniswapV2Handler_InvalidPath()
UniswapV3Handler_InvalidPath
error UniswapV3Handler_InvalidPath()
creation bytecode
0x60c060405234801562000010575f80fd5b5060405162001f2138038062001f21833981016040819052620000339162000067565b6001600160a01b039182166080521660a0526200009d565b80516001600160a01b038116811462000062575f80fd5b919050565b5f806040838503121562000079575f80fd5b62000084836200004b565b915062000094602084016200004b565b90509250929050565b60805160a051611e39620000e85f395f818160cd015281816111190152818161115701526112c901525f818161014601528181610e8801528181610ec601526110170152611e395ff3fe608060405234801561000f575f80fd5b50600436106100c4575f3560e01c8063a55f08d31161007d578063d60116cb11610058578063d60116cb146101fe578063dc2c256f14610211578063f71679d014610224575f80fd5b8063a55f08d31461019d578063ac9650d8146101c4578063c4d88adf146101d7575f80fd5b806352da17a4116100ad57806352da17a41461012e578063596fa9e3146101415780637db6657d14610168575f80fd5b806310f91b0b146100c85780633bc1f1ed14610119575b5f80fd5b6100ef7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61012c6101273660046116e7565b610237565b005b61012c61013c3660046116e7565b61029f565b6100ef7f000000000000000000000000000000000000000000000000000000000000000081565b61018f7f47656e657269630000000000000000000000000000000000000000000000000081565b604051908152602001610110565b61018f7f556e69737761705632000000000000000000000000000000000000000000000081565b61012c6101d2366004611897565b61043a565b61018f7f556e69737761705633000000000000000000000000000000000000000000000081565b61012c61020c3660046116e7565b61053a565b61012c61021f366004611941565b610590565b61012c610232366004611980565b61068e565b3330148015906102815760025f540361027c576040517fce17255100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f555b61028d85858585610839565b80156102985760015f555b5050505050565b3330148015906102e95760025f54036102e4576040517fce17255100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f555b6102f38585610979565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa15801561035d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103819190611a72565b905061038d84826109a4565b6040517facb708150000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff85811660248301529195509086169063acb70815906044016020604051808303815f875af1158015610403573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104279190611a72565b505080156102985760015f555050505050565b3330148015906104845760025f540361047f576040517fce17255100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f555b5f5b825181101561052a575f803073ffffffffffffffffffffffffffffffffffffffff168584815181106104ba576104ba611a89565b60200260200101516040516104cf9190611ad8565b5f604051808303815f865af19150503d805f8114610508576040519150601f19603f3d011682016040523d82523d5f602084013e61050d565b606091505b50915091508161052057610520816109e4565b5050600101610486565b5080156105365760015f555b5050565b3330148015906105845760025f540361057f576040517fce17255100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f555b61028d85858585610a25565b3330148015906105da5760025f54036105d5576040517fce17255100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f555b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa158015610644573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106689190611a72565b905083811061067c5761067c858483610be7565b5080156106885760015f555b50505050565b3330148015906106d85760025f54036106d3576040517fce17255100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f555b6003826020015110610716576040517f70b55f7e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81517fb89a919a8d969d000000000000000000000000000000000000000000000000000161074c5761074782610cf3565b6107e0565b81517faa91968c889e8fa9ce00000000000000000000000000000000000000000000000161077d5761074782610de6565b81517faa91968c889e8fa9cd0000000000000000000000000000000000000000000000016107ae5761074782611070565b6040517f48e355b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208201511561082b5760028260200151036108135761081382608001518360e001518461010001518560400151610a25565b61082b82606001518360a001515f8560c00151610839565b80156105365760015f555050565b6108438484610979565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa1580156108ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108d19190611a72565b9050828110610298576040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff8381166024830152851690636e553f65906044015b6020604051808303815f875af115801561094d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109719190611a72565b505050505050565b61053682827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61131d565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141580156109d457508183115b156109dd578192505b5090919050565b8051156109f357805181602001fd5b6040517f2082e20000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a2f8484610979565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa158015610a99573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abd9190611a72565b9050610ac983826109a4565b6040517facb708150000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff84811660248301529194509085169063acb70815906044016020604051808303815f875af1158015610b3f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b639190611a72565b925082811115610298576040517f6e553f650000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152851690636e553f6590604401610931565b60405173ffffffffffffffffffffffffffffffffffffffff8381166024830152604482018390525f918291861690606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905251610c999190611ad8565b5f604051808303815f865af19150503d805f8114610cd2576040519150601f19603f3d011682016040523d82523d5f602084013e610cd7565b606091505b5091509150610ce68282611364565b61029857610298816109e4565b5f80826101200151806020019051810190610d0e9190611af3565b915091506002836020015103610d2a57610d278361139e565b50505b610d38836060015183610979565b5f808373ffffffffffffffffffffffffffffffffffffffff1683604051610d5f9190611ad8565b5f604051808303815f865af19150503d805f8114610d98576040519150601f19603f3d011682016040523d82523d5f602084013e610d9d565b606091505b5091509150816102985783816040517f436fa211000000000000000000000000000000000000000000000000000000008152600401610ddd929190611bc4565b60405180910390fd5b6020810151610e21576040517fda62918000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040816101200151511080610e475750602081610120015151610e449190611c27565b15155b15610e7e576040517f807d9b7b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eac81606001517f0000000000000000000000000000000000000000000000000000000000000000610979565b5f80610eb78361139e565b9092509050811561106b575f807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff876101200151806020019051810190610f369190611c5f565b8642604051602401610f4c959493929190611cf4565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8803dbee0000000000000000000000000000000000000000000000000000000017905251610fcd9190611ad8565b5f604051808303815f865af19150503d805f8114611006576040519150601f19603f3d011682016040523d82523d5f602084013e61100b565b606091505b509150915081610298577f0000000000000000000000000000000000000000000000000000000000000000816040517f436fa211000000000000000000000000000000000000000000000000000000008152600401610ddd929190611bc4565b505050565b60208101516110ab576040517fda62918000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602b8161012001515110806110d85750601760148261012001515103816110d4576110d4611bfa565b0615155b1561110f576040517f8f22cca200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61113d81606001517f0000000000000000000000000000000000000000000000000000000000000000610979565b5f806111488361139e565b9092509050811561106b575f807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166040518060a0016040528087610120015181526020018573ffffffffffffffffffffffffffffffffffffffff1681526020014281526020018681526020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8152506040516024016111fe9190611d7f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff28c0498000000000000000000000000000000000000000000000000000000001790525161127f9190611ad8565b5f604051808303815f865af19150503d805f81146112b8576040519150601f19603f3d011682016040523d82523d5f602084013e6112bd565b606091505b509150915081610298577f0000000000000000000000000000000000000000000000000000000000000000816040517f436fa211000000000000000000000000000000000000000000000000000000008152600401610ddd929190611bc4565b5f8061132a8585856115a6565b91509150816113565761133e85855f6115a6565b5091508115611356576113528585856115a6565b5091505b8161029857610298816109e4565b5f828015611397575081511580611397575060208251101580156113975750818060200190518101906113979190611de4565b9392505050565b61010081015160e082015160208301516113b757915091565b60808301516040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611425573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114499190611a72565b905060018460200151148015611478575060e084015173ffffffffffffffffffffffffffffffffffffffff1630145b15611497578281101561148d5780830361148f565b5f5b925050915091565b60028460200151036115a05760e084015160408086015190517fd283e75f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201525f92919091169063d283e75f90602401602060405180830381865afa15801561151b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061153f9190611a72565b90508084111561157b576040517fb245150100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9283036101008501819052928382101561159757818403611599565b5f5b9350309250505b50915091565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905291515f926060928492839289169161163f91611ad8565b5f604051808303815f865af19150503d805f8114611678576040519150601f19603f3d011682016040523d82523d5f602084013e61167d565b606091505b50915091508180156116a75750805115806116a75750808060200190518101906116a79190611de4565b97909650945050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146116d4575f80fd5b50565b80356116e2816116b3565b919050565b5f805f80608085870312156116fa575f80fd5b8435611705816116b3565b93506020850135611715816116b3565b925060408501359150606085013561172c816116b3565b939692955090935050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051610140810167ffffffffffffffff8111828210171561178857611788611737565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117d5576117d5611737565b604052919050565b5f67ffffffffffffffff8211156117f6576117f6611737565b5060051b60200190565b5f67ffffffffffffffff82111561181957611819611737565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f82601f830112611854575f80fd5b813561186761186282611800565b61178e565b81815284602083860101111561187b575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208083850312156118a8575f80fd5b823567ffffffffffffffff808211156118bf575f80fd5b818501915085601f8301126118d2575f80fd5b81356118e0611862826117dd565b81815260059190911b830184019084810190888311156118fe575f80fd5b8585015b8381101561193457803585811115611918575f80fd5b6119268b89838a0101611845565b845250918601918601611902565b5098975050505050505050565b5f805f60608486031215611953575f80fd5b833561195e816116b3565b9250602084013591506040840135611975816116b3565b809150509250925092565b5f60208284031215611990575f80fd5b813567ffffffffffffffff808211156119a7575f80fd5b9083019061014082860312156119bb575f80fd5b6119c3611764565b82358152602083013560208201526119dd604084016116d7565b60408201526119ee606084016116d7565b60608201526119ff608084016116d7565b6080820152611a1060a084016116d7565b60a0820152611a2160c084016116d7565b60c0820152611a3260e084016116d7565b60e082015261010083810135908201526101208084013583811115611a55575f80fd5b611a6188828701611845565b918301919091525095945050505050565b5f60208284031215611a82575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5b83811015611ad0578181015183820152602001611ab8565b50505f910152565b5f8251611ae9818460208701611ab6565b9190910192915050565b5f8060408385031215611b04575f80fd5b8251611b0f816116b3565b602084015190925067ffffffffffffffff811115611b2b575f80fd5b8301601f81018513611b3b575f80fd5b8051611b4961186282611800565b818152866020838501011115611b5d575f80fd5b611b6e826020830160208601611ab6565b8093505050509250929050565b5f8151808452611b92816020860160208601611ab6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201525f611bf26040830184611b7b565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82611c5a577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500690565b5f6020808385031215611c70575f80fd5b825167ffffffffffffffff811115611c86575f80fd5b8301601f81018513611c96575f80fd5b8051611ca4611862826117dd565b81815260059190911b82018301908381019087831115611cc2575f80fd5b928401925b82841015611ce9578351611cda816116b3565b82529284019290840190611cc7565b979650505050505050565b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b81811015611d5157845173ffffffffffffffffffffffffffffffffffffffff1683529383019391830191600101611d1f565b505073ffffffffffffffffffffffffffffffffffffffff969096166060850152505050608001529392505050565b602081525f825160a06020840152611d9a60c0840182611b7b565b905073ffffffffffffffffffffffffffffffffffffffff60208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b5f60208284031215611df4575f80fd5b81518015158114611397575f80fdfea2646970667358221220bcce0601ed6b95ba997ab63f34e3bcc4c6dd1b17173329aa82002539ba84522864736f6c634300081800330000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564