[ { "inputs": [ { "internalType": "contract IERC20", "name": "tokenA", "type": "address" }, { "internalType": "contract IERC20", "name": "tokenB", "type": "address" }, { "internalType": "contract IERC20", "name": "tokenC", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "address", "name": "target", "type": "address" } ], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "AddressInsufficientBalance", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }, { "internalType": "uint256", "name": "needed", "type": "uint256" } ], "name": "ERC20InsufficientAllowance", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "needed", "type": "uint256" } ], "name": "ERC20InsufficientBalance", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "approver", "type": "address" } ], "name": "ERC20InvalidApprover", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "ERC20InvalidReceiver", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" } ], "name": "ERC20InvalidSender", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" } ], "name": "ERC20InvalidSpender", "type": "error" }, { "inputs": [], "name": "FailedInnerCall", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [ { "internalType": "uint64", "name": "deadline", "type": "uint64" } ], "name": "S5Pool__DeadlinePast", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "S5Pool__MoreThanZero", "type": "error" }, { "inputs": [ { "internalType": "contract IERC20", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "S5Pool__NotEnoughBalance", "type": "error" }, { "inputs": [ { "internalType": "contract IERC20", "name": "token", "type": "address" } ], "name": "S5Pool__UnknownToken", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "SafeERC20FailedOperation", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Deposited", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "contract IERC20", "name": "tokenFrom", "type": "address" }, { "indexed": true, "internalType": "contract IERC20", "name": "tokenTo", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Swapped", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdrawn", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "calculateFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "contract IERC20", "name": "token", "type": "address" } ], "name": "collectOwnerFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint64", "name": "deadline", "type": "uint64" } ], "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "deadline", "type": "uint64" } ], "name": "redeem", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IERC20", "name": "tokenFrom", "type": "address" }, { "internalType": "contract IERC20", "name": "tokenTo", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "swapFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
60e06040523480156200001157600080fd5b506040516200193a3803806200193a833981016040819052620000349162000163565b336040518060400160405280600d81526020016c5335506f6f6c2053686172657360981b815250604051806040016040528060048152602001635335505360e01b815250816003908162000089919062000252565b50600462000098828262000252565b5050506001600160a01b038116620000ca57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620000d581620000f4565b506001600160a01b0392831660805290821660a0521660c0526200031e565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200015e57600080fd5b919050565b6000806000606084860312156200017957600080fd5b620001848462000146565b9250620001946020850162000146565b9150620001a46040850162000146565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001d857607f821691505b602082108103620001f957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200024d57600081815260208120601f850160051c81016020861015620002285750805b601f850160051c820191505b81811015620002495782815560010162000234565b5050505b505050565b81516001600160401b038111156200026e576200026e620001ad565b62000286816200027f8454620001c3565b84620001ff565b602080601f831160018114620002be5760008415620002a55750858301515b600019600386901b1c1916600185901b17855562000249565b600085815260208120601f198616915b82811015620002ef57888601518255948401946001909101908401620002ce565b50858210156200030e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05161157c620003be6000396000818161052f0152818161066d0152818161071a015281816108fd01528181610a1e0152610afa01526000818161048601528181610639015281816106dc015281816108c8015281816109e00152610abc0152600081816103dd015281816106050152818161069f015281816107a001528181610893015281816109a30152610a7f015261157c6000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a257806399a5d7471161007157806399a5d74714610214578063a9059cbb14610227578063dd62ed3e1461023a578063f2fde38b14610273578063f4e346fb1461028657600080fd5b8063715018a6146101d65780637d552ea6146101de5780638da5cb5b146101f157806395d89b411461020c57600080fd5b8063313ce567116100de578063313ce567146101765780633a4db83814610185578063663a91571461019a57806370a08231146101ad57600080fd5b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015157806323b872dd14610163575b600080fd5b610118610299565b60405161012591906112b8565b60405180910390f35b61014161013c366004611300565b61032b565b6040519015158152602001610125565b6002545b604051908152602001610125565b61014161017136600461132c565b610345565b60405160128152602001610125565b61019861019336600461138a565b61036b565b005b6101986101a83660046113a5565b61069c565b6101556101bb3660046113a5565b6001600160a01b031660009081526020819052604090205490565b6101986107cc565b6101986101ec3660046113c2565b6107e0565b6005546040516001600160a01b039091168152602001610125565b61011861092b565b6101556102223660046113ee565b61093a565b610141610235366004611300565b610954565b610155610248366004611407565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101986102813660046113a5565b610962565b61019861029436600461132c565b6109a0565b6060600380546102a890611440565b80601f01602080910402602001604051908101604052809291908181526020018280546102d490611440565b80156103215780601f106102f657610100808354040283529160200191610321565b820191906000526020600020905b81548152906001019060200180831161030457829003601f168201915b5050505050905090565b600033610339818585610cc0565b60019150505b92915050565b600033610353858285610ccd565b61035e858585610d45565b60019150505b9392505050565b804267ffffffffffffffff168167ffffffffffffffff1610156103b2576040516305aaee7d60e11b815267ffffffffffffffff821660048201526024015b60405180910390fd5b336000908152602081905260408120546002549091906040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561042c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610450919061147a565b61045a90846114a9565b61046491906114c0565b9050600061047160025490565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156104d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f9919061147a565b61050390856114a9565b61050d91906114c0565b9050600061051a60025490565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561057e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a2919061147a565b6105ac90866114a9565b6105b691906114c0565b60405185815290915033907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a26105f83385610da4565b61062c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385610dde565b6106606001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163384610dde565b6106946001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610dde565b505050505050565b807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415801561071157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b801561074f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b1561077857604051638118850f60e01b81526001600160a01b03821660048201526024016103a9565b6006805460009091556107c76107966005546001600160a01b031690565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083610dde565b505050565b6107d4610e3d565b6107de6000610e6a565b565b804267ffffffffffffffff168167ffffffffffffffff161015610822576040516305aaee7d60e11b815267ffffffffffffffff821660048201526024016103a9565b8280600003610847576040516374abeecf60e11b8152600481018290526024016103a9565b6108513385610ebc565b60405184815233907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c49060200160405180910390a26108bb6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087610ef2565b6108f06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087610ef2565b6109256001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087610ef2565b50505050565b6060600480546102a890611440565b60006103e861094a6001846114a9565b61033f91906114c0565b600033610339818585610d45565b61096a610e3d565b6001600160a01b03811661099457604051631e4fbdf760e01b8152600060048201526024016103a9565b61099d81610e6a565b50565b827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614158015610a1557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b8015610a5357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b15610a7c57604051638118850f60e01b81526001600160a01b03821660048201526024016103a9565b827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614158015610af157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b8015610b2f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b15610b5857604051638118850f60e01b81526001600160a01b03821660048201526024016103a9565b6040516370a0823160e01b815230600482015283906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc2919061147a565b1015610bf357604051637d23fb3560e01b81526001600160a01b0385166004820152602481018490526044016103a9565b6000610bfe8461093a565b90506000610c0b8561093a565b905080600654610c1b91906114e2565b6006556000610c2a82846114e2565b610c3490876114f5565b9050866001600160a01b0316886001600160a01b0316336001600160a01b03167f5a417e3ceaff68360f7300df6686a9d417ae12328724de7bc2fd6c012a2ffa8584604051610c8591815260200190565b60405180910390a4610ca26001600160a01b038916333084610ef2565b610cb66001600160a01b0388163383610dde565b5050505050505050565b6107c78383836001610f2b565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146109255781811015610d3657604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016103a9565b61092584848484036000610f2b565b6001600160a01b038316610d6f57604051634b637e8f60e11b8152600060048201526024016103a9565b6001600160a01b038216610d995760405163ec442f0560e01b8152600060048201526024016103a9565b6107c7838383611000565b6001600160a01b038216610dce57604051634b637e8f60e11b8152600060048201526024016103a9565b610dda82600083611000565b5050565b6040516001600160a01b038381166024830152604482018390526107c791859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061112a565b6005546001600160a01b031633146107de5760405163118cdaa760e01b81523360048201526024016103a9565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216610ee65760405163ec442f0560e01b8152600060048201526024016103a9565b610dda60008383611000565b6040516001600160a01b0384811660248301528381166044830152606482018390526109259186918216906323b872dd90608401610e0b565b6001600160a01b038416610f555760405163e602df0560e01b8152600060048201526024016103a9565b6001600160a01b038316610f7f57604051634a1406b160e11b8152600060048201526024016103a9565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561092557826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610ff291815260200190565b60405180910390a350505050565b6001600160a01b03831661102b57806002600082825461102091906114e2565b9091555061109d9050565b6001600160a01b0383166000908152602081905260409020548181101561107e5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103a9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166110b9576002805482900390556110d8565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161111d91815260200190565b60405180910390a3505050565b600061113f6001600160a01b0384168361118d565b905080516000141580156111645750808060200190518101906111629190611508565b155b156107c757604051635274afe760e01b81526001600160a01b03841660048201526024016103a9565b60606103648383600084600080856001600160a01b031684866040516111b3919061152a565b60006040518083038185875af1925050503d80600081146111f0576040519150601f19603f3d011682016040523d82523d6000602084013e6111f5565b606091505b509150915061120586838361120f565b9695505050505050565b6060826112245761121f8261126b565b610364565b815115801561123b57506001600160a01b0384163b155b1561126457604051639996b31560e01b81526001600160a01b03851660048201526024016103a9565b5080610364565b80511561127b5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60005b838110156112af578181015183820152602001611297565b50506000910152565b60208152600082518060208401526112d7816040850160208701611294565b601f01601f19169190910160400192915050565b6001600160a01b038116811461099d57600080fd5b6000806040838503121561131357600080fd5b823561131e816112eb565b946020939093013593505050565b60008060006060848603121561134157600080fd5b833561134c816112eb565b9250602084013561135c816112eb565b929592945050506040919091013590565b803567ffffffffffffffff8116811461138557600080fd5b919050565b60006020828403121561139c57600080fd5b6103648261136d565b6000602082840312156113b757600080fd5b8135610364816112eb565b600080604083850312156113d557600080fd5b823591506113e56020840161136d565b90509250929050565b60006020828403121561140057600080fd5b5035919050565b6000806040838503121561141a57600080fd5b8235611425816112eb565b91506020830135611435816112eb565b809150509250929050565b600181811c9082168061145457607f821691505b60208210810361147457634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561148c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761033f5761033f611493565b6000826114dd57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561033f5761033f611493565b8181038181111561033f5761033f611493565b60006020828403121561151a57600080fd5b8151801515811461036457600080fd5b6000825161153c818460208701611294565b919091019291505056fea264697066735822122067db51819eedd730877b2fff5e3d5caab942d19fab8210bbb64c36b49e34df1964736f6c63430008140033000000000000000000000000c5ad6a512dcaa6858e21f9bb57b12478af6cc346000000000000000000000000d41b6318b9d6daa11592aee28afcd085142688b40000000000000000000000005fbaa7246ef7ec983726393d0153122242e309be