@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
101 lines (100 loc) • 3.96 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UNISWAP_V3_ABI = exports.UNISWAP_QUOTER_ABI = void 0;
exports.UNISWAP_QUOTER_ABI = [
{
inputs: [
{
components: [
{ internalType: "address", name: "tokenIn", type: "address" },
{ internalType: "address", name: "tokenOut", type: "address" },
{ internalType: "uint256", name: "amountIn", type: "uint256" },
{ internalType: "uint24", name: "fee", type: "uint24" },
{ internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
],
internalType: "struct IQuoterV2.QuoteExactInputSingleParams",
name: "params",
type: "tuple",
},
],
name: "quoteExactInputSingle",
outputs: [
{ internalType: "uint256", name: "amountOut", type: "uint256" },
{ internalType: "uint160", name: "sqrtPriceX96After", type: "uint160" },
{ internalType: "uint32", name: "initializedTicksCrossed", type: "uint32" },
{ internalType: "uint256", name: "gasEstimate", type: "uint256" },
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
components: [
{ internalType: "address", name: "tokenIn", type: "address" },
{ internalType: "address", name: "tokenOut", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "uint24", name: "fee", type: "uint24" },
{ internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
],
internalType: "struct IQuoterV2.QuoteExactOutputSingleParams",
name: "params",
type: "tuple",
},
],
name: "quoteExactOutputSingle",
outputs: [
{ internalType: "uint256", name: "amountIn", type: "uint256" },
{ internalType: "uint160", name: "sqrtPriceX96After", type: "uint160" },
{ internalType: "uint32", name: "initializedTicksCrossed", type: "uint32" },
{ internalType: "uint256", name: "gasEstimate", type: "uint256" },
],
stateMutability: "nonpayable",
type: "function",
},
];
exports.UNISWAP_V3_ABI = [
{
inputs: [],
name: "fee",
outputs: [{ internalType: "uint24", name: "", type: "uint24" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "liquidity",
outputs: [{ internalType: "uint128", name: "", type: "uint128" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "slot0",
outputs: [
{ internalType: "uint160", name: "sqrtPriceX96", type: "uint160" },
{ internalType: "int24", name: "tick", type: "int24" },
{ internalType: "uint16", name: "observationIndex", type: "uint16" },
{ internalType: "uint16", name: "observationCardinality", type: "uint16" },
{ internalType: "uint16", name: "observationCardinalityNext", type: "uint16" },
{ internalType: "uint8", name: "feeProtocol", type: "uint8" },
{ internalType: "bool", name: "unlocked", type: "bool" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "token0",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "token1",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
];