UNPKG

@muffinfi/muffin-contracts

Version:

Smart contracts of Muffin Protocol

301 lines (300 loc) 6.8 kB
{ "_format": "hh-sol-artifact-1", "contractName": "Quoter", "sourceName": "contracts/periphery/lens/Quoter.sol", "abi": [ { "inputs": [], "name": "InvalidAmount", "type": "error" }, { "inputs": [], "name": "InvalidSwapPath", "type": "error" }, { "inputs": [], "name": "InvalidTierChoices", "type": "error" }, { "inputs": [], "name": "NotEnoughIntermediateOutput", "type": "error" }, { "inputs": [], "name": "hub", "outputs": [ { "internalType": "contract IMuffinHubCombined", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "manager", "outputs": [ { "internalType": "contract IPositionManager", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "bytes", "name": "", "type": "bytes" } ], "name": "muffinSwapCallback", "outputs": [], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "int256", "name": "amountDesired", "type": "int256" } ], "name": "quote", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "gasUsed", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "uint256", "name": "tierChoices", "type": "uint256" }, { "internalType": "int256", "name": "amountDesired", "type": "int256" } ], "name": "quoteSingle", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "gasUsed", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "path", "type": "bytes" }, { "internalType": "int256", "name": "amountDesired", "type": "int256" } ], "name": "simulate", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "protocolFeeAmt", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierAmountsIn", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "tierAmountsOut", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "tierData", "type": "uint256[]" } ], "internalType": "struct IQuoter.Hop[]", "name": "hops", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenIn", "type": "address" }, { "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "uint256", "name": "tierChoices", "type": "uint256" }, { "internalType": "int256", "name": "amountDesired", "type": "int256" } ], "name": "simulateSingle", "outputs": [ { "components": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "protocolFeeAmt", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierAmountsIn", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "tierAmountsOut", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "tierData", "type": "uint256[]" } ], "internalType": "struct IQuoter.Hop", "name": "hop", "type": "tuple" } ], "stateMutability": "view", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {} }