[ { "type": "constructor", "inputs": [], "stateMutability": "nonpayable" }, { "type": "receive", "stateMutability": "payable" }, { "type": "function", "name": "LMSR", "inputs": [], "outputs": [ { "name": "", "type": "tuple", "internalType": "struct LMSRStabilized.State", "components": [ { "name": "kappa", "type": "int128", "internalType": "int128" }, { "name": "qInternal", "type": "int128[]", "internalType": "int128[]" } ] } ], "stateMutability": "view" }, { "type": "function", "name": "allProtocolFeesOwed", "inputs": [], "outputs": [ { "name": "", "type": "uint256[]", "internalType": "uint256[]" } ], "stateMutability": "view" }, { "type": "function", "name": "allTokens", "inputs": [], "outputs": [ { "name": "", "type": "address[]", "internalType": "contract IERC20[]" } ], "stateMutability": "view" }, { "type": "function", "name": "allowance", "inputs": [ { "name": "owner", "type": "address", "internalType": "address" }, { "name": "spender", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "approve", "inputs": [ { "name": "spender", "type": "address", "internalType": "address" }, { "name": "value", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "balanceOf", "inputs": [ { "name": "account", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "burn", "inputs": [ { "name": "payer", "type": "address", "internalType": "address" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "lpAmount", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }, { "name": "unwrap", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "withdrawAmounts", "type": "uint256[]", "internalType": "uint256[]" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "burnSwap", "inputs": [ { "name": "payer", "type": "address", "internalType": "address" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "lpAmount", "type": "uint256", "internalType": "uint256" }, { "name": "outputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }, { "name": "unwrap", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "amountOut", "type": "uint256", "internalType": "uint256" }, { "name": "outFee", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "collectProtocolFees", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "decimals", "inputs": [], "outputs": [ { "name": "", "type": "uint8", "internalType": "uint8" } ], "stateMutability": "view" }, { "type": "function", "name": "denominators", "inputs": [], "outputs": [ { "name": "", "type": "uint256[]", "internalType": "uint256[]" } ], "stateMutability": "view" }, { "type": "function", "name": "fee", "inputs": [ { "name": "i", "type": "uint256", "internalType": "uint256" }, { "name": "j", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "fees", "inputs": [], "outputs": [ { "name": "", "type": "uint256[]", "internalType": "uint256[]" } ], "stateMutability": "view" }, { "type": "function", "name": "flashFeePpm", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "flashLoan", "inputs": [ { "name": "receiver", "type": "address", "internalType": "contract IERC3156FlashBorrower" }, { "name": "tokenAddr", "type": "address", "internalType": "address" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "data", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "initialMint", "inputs": [ { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "lpTokens", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "lpMinted", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "kappa", "inputs": [], "outputs": [ { "name": "", "type": "int128", "internalType": "int128" } ], "stateMutability": "view" }, { "type": "function", "name": "kill", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "killed", "inputs": [], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "mint", "inputs": [ { "name": "payer", "type": "address", "internalType": "address" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "lpTokenAmount", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "lpMinted", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "mintImpl", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "name", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "numTokens", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "owner", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "protocolFeeAddress", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "protocolFeePpm", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "renounceOwnership", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setProtocolFeeAddress", "inputs": [ { "name": "feeAddress", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "swap", "inputs": [ { "name": "payer", "type": "address", "internalType": "address" }, { "name": "fundingSelector", "type": "bytes4", "internalType": "bytes4" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "inputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "outputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "maxAmountIn", "type": "uint256", "internalType": "uint256" }, { "name": "limitPrice", "type": "int128", "internalType": "int128" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }, { "name": "unwrap", "type": "bool", "internalType": "bool" }, { "name": "cbData", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "amountIn", "type": "uint256", "internalType": "uint256" }, { "name": "amountOut", "type": "uint256", "internalType": "uint256" }, { "name": "inFee", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "swapAmounts", "inputs": [ { "name": "inputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "outputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "maxAmountIn", "type": "uint256", "internalType": "uint256" }, { "name": "limitPrice", "type": "int128", "internalType": "int128" } ], "outputs": [ { "name": "amountIn", "type": "uint256", "internalType": "uint256" }, { "name": "amountOut", "type": "uint256", "internalType": "uint256" }, { "name": "inFee", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "swapImpl", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "swapMint", "inputs": [ { "name": "payer", "type": "address", "internalType": "address" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "inputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "maxAmountIn", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "amountInUsed", "type": "uint256", "internalType": "uint256" }, { "name": "lpMinted", "type": "uint256", "internalType": "uint256" }, { "name": "inFee", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "swapToLimit", "inputs": [ { "name": "payer", "type": "address", "internalType": "address" }, { "name": "fundingSelector", "type": "bytes4", "internalType": "bytes4" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "inputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "outputTokenIndex", "type": "uint256", "internalType": "uint256" }, { "name": "limitPrice", "type": "int128", "internalType": "int128" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }, { "name": "unwrap", "type": "bool", "internalType": "bool" }, { "name": "cbData", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "amountInUsed", "type": "uint256", "internalType": "uint256" }, { "name": "amountOut", "type": "uint256", "internalType": "uint256" }, { "name": "inFee", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "symbol", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "token", "inputs": [ { "name": "i", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "address", "internalType": "contract IERC20" } ], "stateMutability": "view" }, { "type": "function", "name": "totalSupply", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "transfer", "inputs": [ { "name": "to", "type": "address", "internalType": "address" }, { "name": "value", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "transferFrom", "inputs": [ { "name": "from", "type": "address", "internalType": "address" }, { "name": "to", "type": "address", "internalType": "address" }, { "name": "value", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "transferOwnership", "inputs": [ { "name": "newOwner", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "wrapperToken", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract NativeWrapper" } ], "stateMutability": "view" }, { "type": "event", "name": "Approval", "inputs": [ { "name": "owner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "spender", "type": "address", "indexed": true, "internalType": "address" }, { "name": "value", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "Burn", "inputs": [ { "name": "payer", "type": "address", "indexed": false, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amounts", "type": "uint256[]", "indexed": false, "internalType": "uint256[]" }, { "name": "lpBurned", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "BurnSwap", "inputs": [ { "name": "payer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "tokenOut", "type": "address", "indexed": true, "internalType": "contract IERC20" }, { "name": "amountIn", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amountOut", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "protocolFee", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "Flash", "inputs": [ { "name": "initiator", "type": "address", "indexed": true, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "contract IERC3156FlashBorrower" }, { "name": "token", "type": "address", "indexed": true, "internalType": "contract IERC20" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "protocolFee", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "Killed", "inputs": [], "anonymous": false }, { "type": "event", "name": "Mint", "inputs": [ { "name": "payer", "type": "address", "indexed": false, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amounts", "type": "uint256[]", "indexed": false, "internalType": "uint256[]" }, { "name": "lpMinted", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "OwnershipTransferred", "inputs": [ { "name": "previousOwner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "newOwner", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "ProtocolFeesCollected", "inputs": [], "anonymous": false }, { "type": "event", "name": "Swap", "inputs": [ { "name": "payer", "type": "address", "indexed": false, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "tokenIn", "type": "address", "indexed": true, "internalType": "contract IERC20" }, { "name": "tokenOut", "type": "address", "indexed": true, "internalType": "contract IERC20" }, { "name": "amountIn", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amountOut", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "protocolFee", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "SwapMint", "inputs": [ { "name": "payer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "tokenIn", "type": "address", "indexed": true, "internalType": "contract IERC20" }, { "name": "amountIn", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amountOut", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "protocolFee", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "Transfer", "inputs": [ { "name": "from", "type": "address", "indexed": true, "internalType": "address" }, { "name": "to", "type": "address", "indexed": true, "internalType": "address" }, { "name": "value", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "error", "name": "AddressEmptyCode", "inputs": [ { "name": "target", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ERC20InsufficientAllowance", "inputs": [ { "name": "spender", "type": "address", "internalType": "address" }, { "name": "allowance", "type": "uint256", "internalType": "uint256" }, { "name": "needed", "type": "uint256", "internalType": "uint256" } ] }, { "type": "error", "name": "ERC20InsufficientBalance", "inputs": [ { "name": "sender", "type": "address", "internalType": "address" }, { "name": "balance", "type": "uint256", "internalType": "uint256" }, { "name": "needed", "type": "uint256", "internalType": "uint256" } ] }, { "type": "error", "name": "ERC20InvalidApprover", "inputs": [ { "name": "approver", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ERC20InvalidReceiver", "inputs": [ { "name": "receiver", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ERC20InvalidSender", "inputs": [ { "name": "sender", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ERC20InvalidSpender", "inputs": [ { "name": "spender", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "FailedCall", "inputs": [] }, { "type": "error", "name": "InsufficientBalance", "inputs": [ { "name": "balance", "type": "uint256", "internalType": "uint256" }, { "name": "needed", "type": "uint256", "internalType": "uint256" } ] }, { "type": "error", "name": "OwnableInvalidOwner", "inputs": [ { "name": "owner", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "OwnableUnauthorizedAccount", "inputs": [ { "name": "account", "type": "address", "internalType": "address" } ] }, { "type": "error", "name": "ReentrancyGuardReentrantCall", "inputs": [] }, { "type": "error", "name": "SafeERC20FailedOperation", "inputs": [ { "name": "token", "type": "address", "internalType": "address" } ] } ]