1 tx
25 calls
constructor
constructor(address liquidationPairFactory_)
functions
flashSwapCallback
nonpayablefunction flashSwapCallback(address _sender, uint256 _amountIn, uint256, bytes _flashSwapData)
swapExactAmountOut
nonpayablefunction swapExactAmountOut(address _liquidationPair, address _receiver, uint256 _amountOut, uint256 _amountInMax, uint256 _deadline) returns (uint256)
events
LiquidationRouterCreated
event LiquidationRouterCreated(address indexed liquidationPairFactory)
SwappedExactAmountOut
event SwappedExactAmountOut(address indexed liquidationPair, address indexed sender, address indexed receiver, uint256 amountOut, uint256 amountInMax, uint256 amountIn, uint256 deadline)
errors
AddressEmptyCode
error AddressEmptyCode(address target)
FailedCall
error FailedCall()
InsufficientBalance
error InsufficientBalance(uint256 balance, uint256 needed)
InvalidSender
error InvalidSender(address sender)
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
SwapExpired
error SwapExpired(uint256 deadline)
UndefinedFixedPriceLiquidationPairFactory
error UndefinedFixedPriceLiquidationPairFactory()
UnknownFixedPriceLiquidationPair
error UnknownFixedPriceLiquidationPair(address liquidationPair)
creation bytecode
0x60a060405234801561001057600080fd5b50604051610a0b380380610a0b83398101604081905261002f91610094565b6001600160a01b0381166100565760405163678ac12160e01b815260040160405180910390fd5b6001600160a01b03811660808190526040517f04337867c8cdd891953510b2e9be14ee44ea71956bc526708728f14bc6eef24190600090a2506100c4565b6000602082840312156100a657600080fd5b81516001600160a01b03811681146100bd57600080fd5b9392505050565b6080516109266100e560003960008181609901526102e001526109266000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631820b47f1461003b578063a5a6edad14610060575b600080fd5b61004e610049366004610702565b610075565b60405190815260200160405180910390f35b61007361006e366004610753565b6102c8565b005b604051639cded5ab60e01b81526001600160a01b03808716600483015260009187917f00000000000000000000000000000000000000000000000000000000000000001690639cded5ab90602401602060405180830381865afa1580156100e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010491906107eb565b6101315760405163be0b12ad60e01b81526001600160a01b03821660048201526024015b60405180910390fd5b82421115610155576040516372c18cf560e01b815260048101849052602401610128565b604080513360208201526000916001600160a01b038a1691631cf8287d9130918a918a91016040516020818303038152906040526040518563ffffffff1660e01b81526004016101a89493929190610831565b6020604051808303816000875af11580156101c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101eb9190610881565b905061026487878a6001600160a01b031663d0202d3b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610230573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610254919061089a565b6001600160a01b031691906104a6565b6040805187815260208101879052908101829052606081018590526001600160a01b038089169133918b16907fc3e764298a9fad13823b73a0d08df8366d14e2b62920b94b42c635f0ddd0d7b49060800160405180910390a4979650505050505050565b604051639cded5ab60e01b81523360048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639cded5ab90602401602060405180830381865afa15801561032f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035391906107eb565b61037b5760405163be0b12ad60e01b81526001600160a01b0382166004820152602401610128565b856001600160a01b03811630146103b0576040516313053d9360e21b81526001600160a01b0382166004820152602401610128565b60006103be848601866108b7565b905061049c81336001600160a01b031663d4b839926040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610404573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610428919061089a565b89336001600160a01b0316636daf390b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610467573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048b919061089a565b6001600160a01b031692919061050a565b5050505050505050565b6040516001600160a01b0383811660248301526044820183905261050591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610549565b505050565b6040516001600160a01b0384811660248301528381166044830152606482018390526105439186918216906323b872dd906084016104d3565b50505050565b600061055e6001600160a01b038416836105ac565b9050805160001415801561058357508080602001905181019061058191906107eb565b155b1561050557604051635274afe760e01b81526001600160a01b0384166004820152602401610128565b60606105ba838360006105c1565b9392505050565b6060814710156105ed5760405163cf47918160e01b815247600482015260248101839052604401610128565b600080856001600160a01b0316848660405161060991906108d4565b60006040518083038185875af1925050503d8060008114610646576040519150601f19603f3d011682016040523d82523d6000602084013e61064b565b606091505b509150915061065b868383610665565b9695505050505050565b60608261067a57610675826106c1565b6105ba565b815115801561069157506001600160a01b0384163b155b156106ba57604051639996b31560e01b81526001600160a01b0385166004820152602401610128565b50806105ba565b8051156106d15780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b50565b6001600160a01b03811681146106ea57600080fd5b600080600080600060a0868803121561071a57600080fd5b8535610725816106ed565b94506020860135610735816106ed565b94979496505050506040830135926060810135926080909101359150565b60008060008060006080868803121561076b57600080fd5b8535610776816106ed565b94506020860135935060408601359250606086013567ffffffffffffffff8111156107a057600080fd5b8601601f810188136107b157600080fd5b803567ffffffffffffffff8111156107c857600080fd5b8860208284010111156107da57600080fd5b959894975092955050506020019190565b6000602082840312156107fd57600080fd5b815180151581146105ba57600080fd5b60005b83811015610828578181015183820152602001610810565b50506000910152565b60018060a01b0385168152836020820152826040820152608060608201526000825180608084015261086a8160a085016020870161080d565b601f01601f19169190910160a00195945050505050565b60006020828403121561089357600080fd5b5051919050565b6000602082840312156108ac57600080fd5b81516105ba816106ed565b6000602082840312156108c957600080fd5b81356105ba816106ed565b600082516108e681846020870161080d565b919091019291505056fea2646970667358221220614afd1a7cc73d0dbdc7cf2b94857aa421b92ae798d0d791b4252aba9fe0fe4164736f6c634300081b0033000000000000000000000000a1739ece7a90243443543ea57eb5bfb5f4f8e606