packages/synapse-interface/scripts/abi/SwapQuoter.json
[
{
"inputs": [
{
"internalType": "address",
"name": "_synapseRouter",
"type": "address"
},
{
"internalType": "address",
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "owner_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
}
],
"name": "addPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "pools",
"type": "address[]"
}
],
"name": "addPools",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "allPools",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "address",
"name": "lpToken",
"type": "address"
},
{
"components": [
{
"internalType": "bool",
"name": "isWeth",
"type": "bool"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"internalType": "struct PoolToken[]",
"name": "tokens",
"type": "tuple[]"
}
],
"internalType": "struct Pool[]",
"name": "pools",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
}
],
"name": "calculateAddLiquidity",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "calculateRemoveLiquidity",
"outputs": [
{
"internalType": "uint256[]",
"name": "amountsOut",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "uint8",
"name": "tokenIndexFrom",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "tokenIndexTo",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "dx",
"type": "uint256"
}
],
"name": "calculateSwap",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "tokenIndex",
"type": "uint8"
}
],
"name": "calculateWithdrawOneToken",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "actionMask",
"type": "uint256"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"internalType": "struct LimitedToken[]",
"name": "tokensIn",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
}
],
"name": "findConnectedTokens",
"outputs": [
{
"internalType": "uint256",
"name": "amountFound",
"type": "uint256"
},
{
"internalType": "bool[]",
"name": "isConnected",
"type": "bool[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "actionMask",
"type": "uint256"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"internalType": "struct LimitedToken",
"name": "tokenIn",
"type": "tuple"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
}
],
"name": "getAmountOut",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "swapAdapter",
"type": "address"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint256",
"name": "minAmountOut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "rawParams",
"type": "bytes"
}
],
"internalType": "struct SwapQuery",
"name": "query",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
}
],
"name": "poolInfo",
"outputs": [
{
"internalType": "uint256",
"name": "tokens",
"type": "uint256"
},
{
"internalType": "address",
"name": "lpToken",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
}
],
"name": "poolTokens",
"outputs": [
{
"components": [
{
"internalType": "bool",
"name": "isWeth",
"type": "bool"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"internalType": "struct PoolToken[]",
"name": "tokens",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poolsAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
}
],
"name": "removePool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "synapseRouter",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "weth",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]