diff --git a/deployments/metis/DefaultPoolCalc.json b/deployments/metis/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/metis/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/metis/SwapQuoterV2.json b/deployments/metis/SwapQuoterV2.json new file mode 100644 index 000000000..d6cc34d95 --- /dev/null +++ b/deployments/metis/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x71035BE2414fF19d90302f528b97183B87c3c096", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd3200000000000000000000000075cb093e4d61d2a2e65d8e0bbb01de8d89b534810000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "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": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/metis/WGAS.json b/deployments/metis/WGAS.json new file mode 100644 index 000000000..dc0b2d856 --- /dev/null +++ b/deployments/metis/WGAS.json @@ -0,0 +1,3 @@ +{ + "address": "0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481" +} diff --git a/script/configs/metis/SwapQuoterV2.dc.json b/script/configs/metis/SwapQuoterV2.dc.json new file mode 100644 index 000000000..26de65a42 --- /dev/null +++ b/script/configs/metis/SwapQuoterV2.dc.json @@ -0,0 +1,16 @@ +{ + "pools": { + "0": { + "description": "nUSD", + "isLinked": false, + "pool": "0x555982d2E211745b96736665e19D9308B615F78e", + "token": "0x961318Fc85475E125B99Cc9215f62679aE5200aB" + }, + "1": { + "description": "nETH", + "isLinked": false, + "pool": "0x09fEC30669d63A13c666d2129230dD5588E2e240", + "token": "0x931B8f17764362A3325D30681009f0eDd6211231" + } + } +} \ No newline at end of file