diff --git a/src/constants/abis/abis-ethereum.ts b/src/constants/abis/abis-ethereum.ts index 536e6538..01df46b8 100644 --- a/src/constants/abis/abis-ethereum.ts +++ b/src/constants/abis/abis-ethereum.ts @@ -4,6 +4,7 @@ import gaugeSynthetixABI from "./json/gauge_synthetix.json"; import gaugeV2ABI from "./json/gauge_v2.json"; import gaugeV3ABI from "./json/gauge_v3.json"; import gaugeV4ABI from "./json/gauge_v4.json"; +import gaugeV5ABI from "./json/gauge_v5.json"; import gaugeFactoryABI from "./json/gauge_factory.json"; import compoundDepositABI from './json/compound/deposit.json'; import compoundMigrationABI from './json/compound/migration.json'; @@ -82,7 +83,12 @@ import tricrypto2DepositABI from './json/tricrypto2/deposit.json'; import eurtSwapABI from './json/eurt/swap.json'; import eurtusdSwapABI from './json/eurtusd/swap.json'; import eurtusdDepositABI from './json/eurtusd/deposit.json'; -import crvethSwap from './json/crveth/swap.json'; +import eursusdSwapABI from './json/eursusd/swap.json'; +import crvethSwapABI from './json/crveth/swap.json'; +import raiSwapABI from './json/rai/swap.json'; +import raiDepositABI from './json/rai/deposit.json'; +import twopoolSwapABI from './json/2pool/swap.json'; +import fourpoolSwapABI from './json/4pool/swap.json'; import { PoolDataInterface } from "../../interfaces"; @@ -1673,7 +1679,6 @@ export const POOLS_DATA_ETHEREUM: { [index: string]: PoolDataInterface } = { deposit_address: '0x3993d34e7e99Abf6B6f367309975d1360222D446', gauge_abi: gaugeV3ABI, }, - eurt: { name: "eurt", full_name: "eurt", @@ -1701,7 +1706,6 @@ export const POOLS_DATA_ETHEREUM: { [index: string]: PoolDataInterface } = { ], gauge_abi: gaugeV3ABI, }, - eurtusd: { name: "eurtusd", full_name: "eurtusd", @@ -1750,13 +1754,40 @@ export const POOLS_DATA_ETHEREUM: { [index: string]: PoolDataInterface } = { ], gauge_abi: gaugeV4ABI, }, - + eursusd: { + name: "eursusd", + full_name: "eursusd", + symbol: "eursusd", + reference_asset: 'CRYPTO', + swap_abi: eursusdSwapABI, + N_COINS: 2, + is_crypto: true, + underlying_decimals: [6, 2], + decimals: [6, 2], + tethered: [false, false], + use_lending: [false, false], + is_plain: [true, true], + underlying_coins: ['USDC', 'EURS'], + coins: ['USDC', 'EURS'], + swap_address: '0x98a7F18d4E56Cfe84E3D081B40001B3d5bD3eB8B', + token_address: '0x3D229E1B4faab62F621eF2F6A610961f7BD7b23B', + gauge_address: '0x65CA7Dc5CB661fC58De57B1E1aF404649a27AD35', + underlying_coin_addresses: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdB25f211AB05b1c97D595516F45794528a807ad8', + ], + coin_addresses: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdB25f211AB05b1c97D595516F45794528a807ad8', + ], + gauge_abi: gaugeV4ABI, + }, crveth: { name: "crveth", full_name: "crveth", symbol: "crveth", reference_asset: 'CRYPTO', - swap_abi: crvethSwap, + swap_abi: crvethSwapABI, N_COINS: 2, is_crypto: true, underlying_decimals: [18, 18], @@ -1779,13 +1810,60 @@ export const POOLS_DATA_ETHEREUM: { [index: string]: PoolDataInterface } = { ], gauge_abi: gaugeV4ABI, }, - + rai: { + name: "rai", + full_name: "rai", + symbol: "rai", + reference_asset: 'USD', + N_COINS: 2, + underlying_decimals: [18, 18], + decimals: [18, 18], + tethered: [false, false], + use_lending: [false, false], + is_plain: [true, true], + swap_address: '0x618788357D0EBd8A37e763ADab3bc575D54c2C7d', + token_address: '0x6BA5b4e438FA0aAf7C1bD179285aF65d13bD3D90', + gauge_address: '0x66ec719045bBD62db5eBB11184c18237D3Cc2E62', + underlying_coins: ['RAI', 'DAI', 'USDC', 'USDT'], + coins: ['RAI', '3Crv'], + underlying_coin_addresses: [ + '0x03ab458634910aad20ef5f1c8ee96f1d6ac54919', + '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', + ], + coin_addresses: [ + '0x03ab458634910aad20ef5f1c8ee96f1d6ac54919', + '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', + ], + deposit_address: '0xcB636B81743Bb8a7F1E355DEBb7D33b07009cCCC', + is_meta: true, + base_pool: '3pool', + meta_N: 5, + meta_decimals: [18, 18, 18, 6, 6], + meta_coin_decimals: [18, 18, 6, 6], + meta_wrapped_decimals: [18, 18], + meta_coin_addresses: [ + '0x6B175474E89094C44Da98b954EedeAC495271d0F', + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + ], + all_coin_addresses: [ + '0x03ab458634910aad20ef5f1c8ee96f1d6ac54919', + '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', + '0x6B175474E89094C44Da98b954EedeAC495271d0F', + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + ], + is_factory: false, + deposit_abi: raiDepositABI, + swap_abi: raiSwapABI, + gauge_abi: gaugeV4ABI, + }, cvxeth: { name: "cvxeth", full_name: "cvxeth", symbol: "cvxeth", reference_asset: 'CRYPTO', - swap_abi: crvethSwap, + swap_abi: crvethSwapABI, N_COINS: 2, is_crypto: true, underlying_decimals: [18, 18], @@ -1881,7 +1959,7 @@ export const POOLS_DATA_ETHEREUM: { [index: string]: PoolDataInterface } = { '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', '0x090185f2135308bad17527004364ebcc2d37e5f6', ], - swap_abi: crvethSwap, + swap_abi: crvethSwapABI, gauge_abi: gaugeV4ABI, }, teth: { @@ -1909,7 +1987,65 @@ export const POOLS_DATA_ETHEREUM: { [index: string]: PoolDataInterface } = { '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', '0xCdF7028ceAB81fA0C6971208e83fa7872994beE5', ], - swap_abi: crvethSwap, + swap_abi: crvethSwapABI, gauge_abi: gaugeV4ABI, }, + '2pool': { + name: "2pool", + full_name: "2pool", + symbol: "2pool", + reference_asset: 'USD', + N_COINS: 2, + underlying_decimals: [6, 6], + decimals: [6, 6], + tethered: [false, true], + use_lending: [false, false], + is_plain: [true, true], + swap_address: '0x1005f7406f32a61bd760cfa14accd2737913d546', + token_address: '0x1005f7406f32a61bd760cfa14accd2737913d546', + gauge_address: '0x9f330db38caaae5b61b410e2f0aad63fff2109d8', + underlying_coins: ['USDC', 'USDT'], + coins: ['USDC', 'USDT'], + underlying_coin_addresses: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + ], + coin_addresses: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + ], + swap_abi: twopoolSwapABI, + gauge_abi: gaugeV5ABI, + }, + '4pool': { + name: "4pool", + full_name: "4pool", + symbol: "4pool", + reference_asset: 'USD', + N_COINS: 4, + underlying_decimals: [6, 6, 6, 18], + decimals: [6, 6, 6, 18], + tethered: [false, true, false, false], + use_lending: [false, false, false, false], + is_plain: [true, true, true, true], + swap_address: '0x4e0915C88bC70750D68C481540F081fEFaF22273', + token_address: '0x4e0915C88bC70750D68C481540F081fEFaF22273', + gauge_address: '0x34883134a39b206a451c2d3b0e7cac44be4d9181', + underlying_coins: ['USDC', 'USDT', 'UST', 'FRAX'], + coins: ['USDC', 'USDT', 'UST', 'FRAX'], + underlying_coin_addresses: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + '0xa693B19d2931d498c5B318dF961919BB4aee87a5', + '0x853d955acef822db058eb8505911ed77f175b99e', + ], + coin_addresses: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + '0xa693B19d2931d498c5B318dF961919BB4aee87a5', + '0x853d955acef822db058eb8505911ed77f175b99e', + ], + swap_abi: fourpoolSwapABI, + gauge_abi: gaugeV5ABI, + }, }; diff --git a/src/constants/abis/json/2pool/swap.json b/src/constants/abis/json/2pool/swap.json new file mode 100644 index 00000000..7b9f31ad --- /dev/null +++ b/src/constants/abis/json/2pool/swap.json @@ -0,0 +1,1065 @@ +[ + { + "name": "Transfer", + "inputs": [ + { + "type": "address", + "name": "sender", + "indexed": true + }, + { + "type": "address", + "name": "receiver", + "indexed": true + }, + { + "type": "uint256", + "name": "value", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "Approval", + "inputs": [ + { + "type": "address", + "name": "owner", + "indexed": true + }, + { + "type": "address", + "name": "spender", + "indexed": true + }, + { + "type": "uint256", + "name": "value", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "TokenExchange", + "inputs": [ + { + "type": "address", + "name": "buyer", + "indexed": true + }, + { + "type": "int128", + "name": "sold_id", + "indexed": false + }, + { + "type": "uint256", + "name": "tokens_sold", + "indexed": false + }, + { + "type": "int128", + "name": "bought_id", + "indexed": false + }, + { + "type": "uint256", + "name": "tokens_bought", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { + "type": "address", + "name": "provider", + "indexed": true + }, + { + "type": "uint256[2]", + "name": "token_amounts", + "indexed": false + }, + { + "type": "uint256[2]", + "name": "fees", + "indexed": false + }, + { + "type": "uint256", + "name": "invariant", + "indexed": false + }, + { + "type": "uint256", + "name": "token_supply", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { + "type": "address", + "name": "provider", + "indexed": true + }, + { + "type": "uint256[2]", + "name": "token_amounts", + "indexed": false + }, + { + "type": "uint256[2]", + "name": "fees", + "indexed": false + }, + { + "type": "uint256", + "name": "token_supply", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { + "type": "address", + "name": "provider", + "indexed": true + }, + { + "type": "uint256", + "name": "token_amount", + "indexed": false + }, + { + "type": "uint256", + "name": "coin_amount", + "indexed": false + }, + { + "type": "uint256", + "name": "token_supply", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityImbalance", + "inputs": [ + { + "type": "address", + "name": "provider", + "indexed": true + }, + { + "type": "uint256[2]", + "name": "token_amounts", + "indexed": false + }, + { + "type": "uint256[2]", + "name": "fees", + "indexed": false + }, + { + "type": "uint256", + "name": "invariant", + "indexed": false + }, + { + "type": "uint256", + "name": "token_supply", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewAdmin", + "inputs": [ + { + "type": "uint256", + "name": "deadline", + "indexed": true + }, + { + "type": "address", + "name": "admin", + "indexed": true + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewAdmin", + "inputs": [ + { + "type": "address", + "name": "admin", + "indexed": true + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewFee", + "inputs": [ + { + "type": "uint256", + "name": "deadline", + "indexed": true + }, + { + "type": "uint256", + "name": "fee", + "indexed": false + }, + { + "type": "uint256", + "name": "admin_fee", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewFee", + "inputs": [ + { + "type": "uint256", + "name": "fee", + "indexed": false + }, + { + "type": "uint256", + "name": "admin_fee", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RampA", + "inputs": [ + { + "type": "uint256", + "name": "old_A", + "indexed": false + }, + { + "type": "uint256", + "name": "new_A", + "indexed": false + }, + { + "type": "uint256", + "name": "initial_time", + "indexed": false + }, + { + "type": "uint256", + "name": "future_time", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StopRampA", + "inputs": [ + { + "type": "uint256", + "name": "A", + "indexed": false + }, + { + "type": "uint256", + "name": "t", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "outputs": [], + "inputs": [ + { + "type": "string", + "name": "_name" + }, + { + "type": "string", + "name": "_symbol" + }, + { + "type": "address", + "name": "_owner" + }, + { + "type": "address[2]", + "name": "_coins" + }, + { + "type": "uint256", + "name": "_A" + }, + { + "type": "uint256", + "name": "_fee" + }, + { + "type": "uint256", + "name": "_admin_fee" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "name": "decimals", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "261" + }, + { + "name": "transfer", + "outputs": [ + { + "type": "bool", + "name": "" + } + ], + "inputs": [ + { + "type": "address", + "name": "_to" + }, + { + "type": "uint256", + "name": "_value" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "74713" + }, + { + "name": "transferFrom", + "outputs": [ + { + "type": "bool", + "name": "" + } + ], + "inputs": [ + { + "type": "address", + "name": "_from" + }, + { + "type": "address", + "name": "_to" + }, + { + "type": "uint256", + "name": "_value" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "111355" + }, + { + "name": "approve", + "outputs": [ + { + "type": "bool", + "name": "" + } + ], + "inputs": [ + { + "type": "address", + "name": "_spender" + }, + { + "type": "uint256", + "name": "_value" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "37794" + }, + { + "name": "A", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "5439" + }, + { + "name": "A_precise", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "5401" + }, + { + "name": "get_virtual_price", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "1009729" + }, + { + "name": "calc_token_amount", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256[2]", + "name": "_amounts" + }, + { + "type": "bool", + "name": "_is_deposit" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "4016564" + }, + { + "name": "add_liquidity", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256[2]", + "name": "_amounts" + }, + { + "type": "uint256", + "name": "_min_mint_amount" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "6262149" + }, + { + "name": "get_dy", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "int128", + "name": "i" + }, + { + "type": "int128", + "name": "j" + }, + { + "type": "uint256", + "name": "_dx" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "2447901" + }, + { + "name": "exchange", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "int128", + "name": "i" + }, + { + "type": "int128", + "name": "j" + }, + { + "type": "uint256", + "name": "_dx" + }, + { + "type": "uint256", + "name": "_min_dy" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "2610850" + }, + { + "name": "remove_liquidity", + "outputs": [ + { + "type": "uint256[2]", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256", + "name": "_amount" + }, + { + "type": "uint256[2]", + "name": "_min_amounts" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "238744" + }, + { + "name": "remove_liquidity_imbalance", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256[2]", + "name": "_amounts" + }, + { + "type": "uint256", + "name": "_max_burn_amount" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "6261825" + }, + { + "name": "calc_withdraw_one_coin", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256", + "name": "_token_amount" + }, + { + "type": "int128", + "name": "i" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "1609" + }, + { + "name": "remove_liquidity_one_coin", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256", + "name": "_token_amount" + }, + { + "type": "int128", + "name": "i" + }, + { + "type": "uint256", + "name": "_min_amount" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "3947982" + }, + { + "name": "ramp_A", + "outputs": [], + "inputs": [ + { + "type": "uint256", + "name": "_future_A" + }, + { + "type": "uint256", + "name": "_future_time" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "152014" + }, + { + "name": "stop_ramp_A", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "148775" + }, + { + "name": "commit_new_fee", + "outputs": [], + "inputs": [ + { + "type": "uint256", + "name": "_new_fee" + }, + { + "type": "uint256", + "name": "_new_admin_fee" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "110491" + }, + { + "name": "apply_new_fee", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "97272" + }, + { + "name": "revert_new_parameters", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "21925" + }, + { + "name": "commit_transfer_ownership", + "outputs": [], + "inputs": [ + { + "type": "address", + "name": "_owner" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "gas": "74663" + }, + { + "name": "apply_transfer_ownership", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "60740" + }, + { + "name": "revert_transfer_ownership", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "22015" + }, + { + "name": "admin_balances", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256", + "name": "i" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "3511" + }, + { + "name": "withdraw_admin_fees", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "15067" + }, + { + "name": "donate_admin_fees", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "74995" + }, + { + "name": "kill_me", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "38028" + }, + { + "name": "unkill_me", + "outputs": [], + "inputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": "22165" + }, + { + "name": "coins", + "outputs": [ + { + "type": "address", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256", + "name": "arg0" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "2250" + }, + { + "name": "balances", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "uint256", + "name": "arg0" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "2280" + }, + { + "name": "fee", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2201" + }, + { + "name": "admin_fee", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2231" + }, + { + "name": "owner", + "outputs": [ + { + "type": "address", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2261" + }, + { + "name": "initial_A", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2291" + }, + { + "name": "future_A", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2321" + }, + { + "name": "initial_A_time", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2351" + }, + { + "name": "future_A_time", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2381" + }, + { + "name": "admin_actions_deadline", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2411" + }, + { + "name": "transfer_ownership_deadline", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2441" + }, + { + "name": "future_fee", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2471" + }, + { + "name": "future_admin_fee", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2501" + }, + { + "name": "future_owner", + "outputs": [ + { + "type": "address", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2531" + }, + { + "name": "name", + "outputs": [ + { + "type": "string", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "8963" + }, + { + "name": "symbol", + "outputs": [ + { + "type": "string", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "8016" + }, + { + "name": "balanceOf", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "address", + "name": "arg0" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "2836" + }, + { + "name": "allowance", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [ + { + "type": "address", + "name": "arg0" + }, + { + "type": "address", + "name": "arg1" + } + ], + "stateMutability": "view", + "type": "function", + "gas": "3081" + }, + { + "name": "totalSupply", + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], + "inputs": [], + "stateMutability": "view", + "type": "function", + "gas": "2681" + } +] \ No newline at end of file diff --git a/src/constants/abis/json/4pool/swap.json b/src/constants/abis/json/4pool/swap.json new file mode 100644 index 00000000..09c029e3 --- /dev/null +++ b/src/constants/abis/json/4pool/swap.json @@ -0,0 +1,951 @@ +[ + { + "name": "Transfer", + "inputs": [ + { + "name": "sender", + "type": "address", + "indexed": true + }, + { + "name": "receiver", + "type": "address", + "indexed": true + }, + { + "name": "value", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true + }, + { + "name": "spender", + "type": "address", + "indexed": true + }, + { + "name": "value", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "TokenExchange", + "inputs": [ + { + "name": "buyer", + "type": "address", + "indexed": true + }, + { + "name": "sold_id", + "type": "int128", + "indexed": false + }, + { + "name": "tokens_sold", + "type": "uint256", + "indexed": false + }, + { + "name": "bought_id", + "type": "int128", + "indexed": false + }, + { + "name": "tokens_bought", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[4]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[4]", + "indexed": false + }, + { + "name": "invariant", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[4]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[4]", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amount", + "type": "uint256", + "indexed": false + }, + { + "name": "coin_amount", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityImbalance", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[4]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[4]", + "indexed": false + }, + { + "name": "invariant", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RampA", + "inputs": [ + { + "name": "old_A", + "type": "uint256", + "indexed": false + }, + { + "name": "new_A", + "type": "uint256", + "indexed": false + }, + { + "name": "initial_time", + "type": "uint256", + "indexed": false + }, + { + "name": "future_time", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StopRampA", + "inputs": [ + { + "name": "A", + "type": "uint256", + "indexed": false + }, + { + "name": "t", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "TransferOwnership", + "inputs": [ + { + "name": "_old_owner", + "type": "address", + "indexed": false + }, + { + "name": "_new_owner", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_coins", + "type": "address[4]" + }, + { + "name": "_rate_multipliers", + "type": "uint256[4]" + }, + { + "name": "_A", + "type": "uint256" + }, + { + "name": "_fee", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_deadline", + "type": "uint256" + }, + { + "name": "_v", + "type": "uint8" + }, + { + "name": "_r", + "type": "bytes32" + }, + { + "name": "_s", + "type": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "balances", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_balances", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[4]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "A_precise", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_virtual_price", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_token_amount", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[4]" + }, + { + "name": "_is_deposit", + "type": "bool" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[4]" + }, + { + "name": "_min_mint_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_dy", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "dx", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "exchange", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + }, + { + "name": "_min_dy", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "_min_amounts", + "type": "uint256[4]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[4]" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_imbalance", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[4]" + }, + { + "name": "_max_burn_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_withdraw_one_coin", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_one_coin", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + }, + { + "name": "_min_received", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "ramp_A", + "inputs": [ + { + "name": "_future_A", + "type": "uint256" + }, + { + "name": "_future_time", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "stop_ramp_A", + "inputs": [], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "withdraw_admin_fees", + "inputs": [], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_transfer_ownership", + "inputs": [ + { + "name": "_future_owner", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "accept_transfer_ownership", + "inputs": [], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "pure", + "type": "function", + "name": "coins", + "inputs": [ + { + "name": "_i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "pure", + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "pure", + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "pure", + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_balances", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "arg0", + "type": "address" + }, + { + "name": "arg1", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + } +] \ No newline at end of file diff --git a/src/constants/abis/json/eursusd/swap.json b/src/constants/abis/json/eursusd/swap.json new file mode 100644 index 00000000..bc9c4ac6 --- /dev/null +++ b/src/constants/abis/json/eursusd/swap.json @@ -0,0 +1,1199 @@ +[ + { + "name": "TokenExchange", + "inputs": [ + { + "name": "buyer", + "type": "address", + "indexed": true + }, + { + "name": "sold_id", + "type": "uint256", + "indexed": false + }, + { + "name": "tokens_sold", + "type": "uint256", + "indexed": false + }, + { + "name": "bought_id", + "type": "uint256", + "indexed": false + }, + { + "name": "tokens_bought", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "fee", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amount", + "type": "uint256", + "indexed": false + }, + { + "name": "coin_index", + "type": "uint256", + "indexed": false + }, + { + "name": "coin_amount", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewAdmin", + "inputs": [ + { + "name": "deadline", + "type": "uint256", + "indexed": true + }, + { + "name": "admin", + "type": "address", + "indexed": true + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewAdmin", + "inputs": [ + { + "name": "admin", + "type": "address", + "indexed": true + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewParameters", + "inputs": [ + { + "name": "deadline", + "type": "uint256", + "indexed": true + }, + { + "name": "admin_fee", + "type": "uint256", + "indexed": false + }, + { + "name": "mid_fee", + "type": "uint256", + "indexed": false + }, + { + "name": "out_fee", + "type": "uint256", + "indexed": false + }, + { + "name": "fee_gamma", + "type": "uint256", + "indexed": false + }, + { + "name": "allowed_extra_profit", + "type": "uint256", + "indexed": false + }, + { + "name": "adjustment_step", + "type": "uint256", + "indexed": false + }, + { + "name": "ma_half_time", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewParameters", + "inputs": [ + { + "name": "admin_fee", + "type": "uint256", + "indexed": false + }, + { + "name": "mid_fee", + "type": "uint256", + "indexed": false + }, + { + "name": "out_fee", + "type": "uint256", + "indexed": false + }, + { + "name": "fee_gamma", + "type": "uint256", + "indexed": false + }, + { + "name": "allowed_extra_profit", + "type": "uint256", + "indexed": false + }, + { + "name": "adjustment_step", + "type": "uint256", + "indexed": false + }, + { + "name": "ma_half_time", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RampAgamma", + "inputs": [ + { + "name": "initial_A", + "type": "uint256", + "indexed": false + }, + { + "name": "future_A", + "type": "uint256", + "indexed": false + }, + { + "name": "initial_gamma", + "type": "uint256", + "indexed": false + }, + { + "name": "future_gamma", + "type": "uint256", + "indexed": false + }, + { + "name": "initial_time", + "type": "uint256", + "indexed": false + }, + { + "name": "future_time", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StopRampA", + "inputs": [ + { + "name": "current_A", + "type": "uint256", + "indexed": false + }, + { + "name": "current_gamma", + "type": "uint256", + "indexed": false + }, + { + "name": "time", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "ClaimAdminFee", + "inputs": [ + { + "name": "admin", + "type": "address", + "indexed": true + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "admin_fee_receiver", + "type": "address" + }, + { + "name": "A", + "type": "uint256" + }, + { + "name": "gamma", + "type": "uint256" + }, + { + "name": "mid_fee", + "type": "uint256" + }, + { + "name": "out_fee", + "type": "uint256" + }, + { + "name": "allowed_extra_profit", + "type": "uint256" + }, + { + "name": "fee_gamma", + "type": "uint256" + }, + { + "name": "adjustment_step", + "type": "uint256" + }, + { + "name": "admin_fee", + "type": "uint256" + }, + { + "name": "ma_half_time", + "type": "uint256" + }, + { + "name": "initial_price", + "type": "uint256" + } + ], + "outputs": [], + "name": "constructor" + }, + { + "stateMutability": "view", + "type": "function", + "name": "token", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "426" + }, + { + "stateMutability": "view", + "type": "function", + "name": "coins", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "558" + }, + { + "stateMutability": "view", + "type": "function", + "name": "A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "595" + }, + { + "stateMutability": "view", + "type": "function", + "name": "gamma", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "6499" + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "9743" + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_virtual_price", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "360707" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "exchange", + "inputs": [ + { + "name": "i", + "type": "uint256" + }, + { + "name": "j", + "type": "uint256" + }, + { + "name": "dx", + "type": "uint256" + }, + { + "name": "min_dy", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "16670379" + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_dy", + "inputs": [ + { + "name": "i", + "type": "uint256" + }, + { + "name": "j", + "type": "uint256" + }, + { + "name": "dx", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "4557895" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { + "name": "amounts", + "type": "uint256[2]" + }, + { + "name": "min_mint_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "17621237" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "min_amounts", + "type": "uint256[2]" + } + ], + "outputs": [], + "gas": "174292" + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_token_amount", + "inputs": [ + { + "name": "amounts", + "type": "uint256[2]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "5182497" + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_withdraw_one_coin", + "inputs": [ + { + "name": "token_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "7264" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_one_coin", + "inputs": [ + { + "name": "token_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "uint256" + }, + { + "name": "min_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "16601846" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "claim_admin_fees", + "inputs": [], + "outputs": [], + "gas": "3226971" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "ramp_A_gamma", + "inputs": [ + { + "name": "future_A", + "type": "uint256" + }, + { + "name": "future_gamma", + "type": "uint256" + }, + { + "name": "future_time", + "type": "uint256" + } + ], + "outputs": [], + "gas": "153778" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "stop_ramp_A_gamma", + "inputs": [], + "outputs": [], + "gas": "150123" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_new_parameters", + "inputs": [ + { + "name": "_new_mid_fee", + "type": "uint256" + }, + { + "name": "_new_out_fee", + "type": "uint256" + }, + { + "name": "_new_admin_fee", + "type": "uint256" + }, + { + "name": "_new_fee_gamma", + "type": "uint256" + }, + { + "name": "_new_allowed_extra_profit", + "type": "uint256" + }, + { + "name": "_new_adjustment_step", + "type": "uint256" + }, + { + "name": "_new_ma_half_time", + "type": "uint256" + } + ], + "outputs": [], + "gas": "293264" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "apply_new_parameters", + "inputs": [], + "outputs": [], + "gas": "3504861" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "revert_new_parameters", + "inputs": [], + "outputs": [], + "gas": "21722" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_transfer_ownership", + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "outputs": [], + "gas": "76107" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "apply_transfer_ownership", + "inputs": [], + "outputs": [], + "gas": "61722" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "revert_transfer_ownership", + "inputs": [], + "outputs": [], + "gas": "21812" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "kill_me", + "inputs": [], + "outputs": [], + "gas": "37735" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "unkill_me", + "inputs": [], + "outputs": [], + "gas": "21872" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_admin_fee_receiver", + "inputs": [ + { + "name": "_admin_fee_receiver", + "type": "address" + } + ], + "outputs": [], + "gas": "37062" + }, + { + "stateMutability": "view", + "type": "function", + "name": "price_scale", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "1976" + }, + { + "stateMutability": "view", + "type": "function", + "name": "price_oracle", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2006" + }, + { + "stateMutability": "view", + "type": "function", + "name": "last_prices", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2036" + }, + { + "stateMutability": "view", + "type": "function", + "name": "last_prices_timestamp", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2066" + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A_gamma", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2096" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A_gamma", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2126" + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A_gamma_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2156" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A_gamma_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2186" + }, + { + "stateMutability": "view", + "type": "function", + "name": "allowed_extra_profit", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2216" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_allowed_extra_profit", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2246" + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee_gamma", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2276" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_fee_gamma", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2306" + }, + { + "stateMutability": "view", + "type": "function", + "name": "adjustment_step", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2336" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_adjustment_step", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2366" + }, + { + "stateMutability": "view", + "type": "function", + "name": "ma_half_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2396" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_ma_half_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2426" + }, + { + "stateMutability": "view", + "type": "function", + "name": "mid_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2456" + }, + { + "stateMutability": "view", + "type": "function", + "name": "out_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2486" + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2516" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_mid_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2546" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_out_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2576" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_admin_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2606" + }, + { + "stateMutability": "view", + "type": "function", + "name": "balances", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2681" + }, + { + "stateMutability": "view", + "type": "function", + "name": "D", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2666" + }, + { + "stateMutability": "view", + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2696" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2726" + }, + { + "stateMutability": "view", + "type": "function", + "name": "xcp_profit", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2756" + }, + { + "stateMutability": "view", + "type": "function", + "name": "xcp_profit_a", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2786" + }, + { + "stateMutability": "view", + "type": "function", + "name": "virtual_price", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2816" + }, + { + "stateMutability": "view", + "type": "function", + "name": "is_killed", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "gas": "2846" + }, + { + "stateMutability": "view", + "type": "function", + "name": "kill_deadline", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2876" + }, + { + "stateMutability": "view", + "type": "function", + "name": "transfer_ownership_deadline", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2906" + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_actions_deadline", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2936" + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_fee_receiver", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2966" + } +] \ No newline at end of file diff --git a/src/constants/abis/json/gauge_v5.json b/src/constants/abis/json/gauge_v5.json new file mode 100644 index 00000000..1285a65e --- /dev/null +++ b/src/constants/abis/json/gauge_v5.json @@ -0,0 +1,958 @@ +[ + { + "name": "Deposit", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "value", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "Withdraw", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "value", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "UpdateLiquidityLimit", + "inputs": [ + { + "name": "user", + "type": "address", + "indexed": false + }, + { + "name": "original_balance", + "type": "uint256", + "indexed": false + }, + { + "name": "original_supply", + "type": "uint256", + "indexed": false + }, + { + "name": "working_balance", + "type": "uint256", + "indexed": false + }, + { + "name": "working_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitOwnership", + "inputs": [ + { + "name": "admin", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "ApplyOwnership", + "inputs": [ + { + "name": "admin", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "Transfer", + "inputs": [ + { + "name": "_from", + "type": "address", + "indexed": true + }, + { + "name": "_to", + "type": "address", + "indexed": true + }, + { + "name": "_value", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "Approval", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true + }, + { + "name": "_spender", + "type": "address", + "indexed": true + }, + { + "name": "_value", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_lp_token", + "type": "address" + }, + { + "name": "_admin", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "integrate_checkpoint", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "user_checkpoint", + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "claimable_tokens", + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "claimed_reward", + "inputs": [ + { + "name": "_addr", + "type": "address" + }, + { + "name": "_token", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "claimable_reward", + "inputs": [ + { + "name": "_user", + "type": "address" + }, + { + "name": "_reward_token", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_rewards_receiver", + "inputs": [ + { + "name": "_receiver", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "claim_rewards", + "inputs": [], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "kick", + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_deadline", + "type": "uint256" + }, + { + "name": "_v", + "type": "uint8" + }, + { + "name": "_r", + "type": "bytes32" + }, + { + "name": "_s", + "type": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_added_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_subtracted_value", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_reward", + "inputs": [ + { + "name": "_reward_token", + "type": "address" + }, + { + "name": "_distributor", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_reward_distributor", + "inputs": [ + { + "name": "_reward_token", + "type": "address" + }, + { + "name": "_distributor", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "deposit_reward_token", + "inputs": [ + { + "name": "_reward_token", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_killed", + "inputs": [ + { + "name": "_is_killed", + "type": "bool" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_transfer_ownership", + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "accept_transfer_ownership", + "inputs": [], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "lp_token", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_epoch_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "arg0", + "type": "address" + }, + { + "name": "arg1", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "working_balances", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "working_supply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "reward_count", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "reward_tokens", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "reward_data", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "components": [ + { + "name": "token", + "type": "address" + }, + { + "name": "distributor", + "type": "address" + }, + { + "name": "period_finish", + "type": "uint256" + }, + { + "name": "rate", + "type": "uint256" + }, + { + "name": "last_update", + "type": "uint256" + }, + { + "name": "integral", + "type": "uint256" + } + ] + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "rewards_receiver", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "reward_integral_for", + "inputs": [ + { + "name": "arg0", + "type": "address" + }, + { + "name": "arg1", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_admin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "is_killed", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "integrate_inv_supply_of", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "integrate_checkpoint_of", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "integrate_fraction", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "inflation_rate", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "period", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "int128" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "period_timestamp", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "integrate_inv_supply", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + } +] \ No newline at end of file diff --git a/src/constants/abis/json/rai/deposit.json b/src/constants/abis/json/rai/deposit.json new file mode 100644 index 00000000..fbac1a0f --- /dev/null +++ b/src/constants/abis/json/rai/deposit.json @@ -0,0 +1,228 @@ +[ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_pool", + "type": "address" + }, + { + "name": "_token", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[4]" + }, + { + "name": "_min_mint_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "86660" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_min_amounts", + "type": "uint256[4]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[4]" + } + ], + "gas": "82960" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_one_coin", + "inputs": [ + { + "name": "_token_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + }, + { + "name": "_min_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "38114" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_imbalance", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[4]" + }, + { + "name": "_max_burn_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "88693" + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_withdraw_one_coin", + "inputs": [ + { + "name": "_token_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "9894" + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_token_amount", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[4]" + }, + { + "name": "_is_deposit", + "type": "bool" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "10963" + }, + { + "stateMutability": "view", + "type": "function", + "name": "pool", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2568" + }, + { + "stateMutability": "view", + "type": "function", + "name": "token", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2598" + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_pool", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2628" + }, + { + "stateMutability": "view", + "type": "function", + "name": "coins", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2767" + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_coins", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "2797" + } +] \ No newline at end of file diff --git a/src/constants/abis/json/rai/swap.json b/src/constants/abis/json/rai/swap.json new file mode 100644 index 00000000..07a4a5b6 --- /dev/null +++ b/src/constants/abis/json/rai/swap.json @@ -0,0 +1,1039 @@ +[ + { + "name": "TokenExchange", + "inputs": [ + { + "name": "buyer", + "type": "address", + "indexed": true + }, + { + "name": "sold_id", + "type": "int128", + "indexed": false + }, + { + "name": "tokens_sold", + "type": "uint256", + "indexed": false + }, + { + "name": "bought_id", + "type": "int128", + "indexed": false + }, + { + "name": "tokens_bought", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "TokenExchangeUnderlying", + "inputs": [ + { + "name": "buyer", + "type": "address", + "indexed": true + }, + { + "name": "sold_id", + "type": "int128", + "indexed": false + }, + { + "name": "tokens_sold", + "type": "uint256", + "indexed": false + }, + { + "name": "bought_id", + "type": "int128", + "indexed": false + }, + { + "name": "tokens_bought", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "AddLiquidity", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "invariant", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidity", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amount", + "type": "uint256", + "indexed": false + }, + { + "name": "coin_amount", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityImbalance", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_amounts", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[2]", + "indexed": false + }, + { + "name": "invariant", + "type": "uint256", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewAdmin", + "inputs": [ + { + "name": "deadline", + "type": "uint256", + "indexed": true + }, + { + "name": "admin", + "type": "address", + "indexed": true + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewAdmin", + "inputs": [ + { + "name": "admin", + "type": "address", + "indexed": true + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "CommitNewFee", + "inputs": [ + { + "name": "deadline", + "type": "uint256", + "indexed": true + }, + { + "name": "fee", + "type": "uint256", + "indexed": false + }, + { + "name": "admin_fee", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "NewFee", + "inputs": [ + { + "name": "fee", + "type": "uint256", + "indexed": false + }, + { + "name": "admin_fee", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RampA", + "inputs": [ + { + "name": "old_A", + "type": "uint256", + "indexed": false + }, + { + "name": "new_A", + "type": "uint256", + "indexed": false + }, + { + "name": "initial_time", + "type": "uint256", + "indexed": false + }, + { + "name": "future_time", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "StopRampA", + "inputs": [ + { + "name": "A", + "type": "uint256", + "indexed": false + }, + { + "name": "t", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_coins", + "type": "address[2]" + }, + { + "name": "_pool_token", + "type": "address" + }, + { + "name": "_base_pool", + "type": "address" + }, + { + "name": "_redemption_price_snap", + "type": "address" + }, + { + "name": "_A", + "type": "uint256" + }, + { + "name": "_fee", + "type": "uint256" + }, + { + "name": "_admin_fee", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "10374" + }, + { + "stateMutability": "view", + "type": "function", + "name": "A_precise", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "10336" + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_virtual_price", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2070135" + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_virtual_price_2", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2295357" + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_token_amount", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[2]" + }, + { + "name": "_is_deposit", + "type": "bool" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "4038330" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[2]" + }, + { + "name": "_min_mint_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "6231201" + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_dy", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2483148" + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_dy_underlying", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2494262" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "exchange", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + }, + { + "name": "_min_dy", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2723828" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "exchange_underlying", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + }, + { + "name": "_min_dy", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "2754318" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_min_amounts", + "type": "uint256[2]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[2]" + } + ], + "gas": "174423" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_imbalance", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[2]" + }, + { + "name": "_max_burn_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "6216452" + }, + { + "stateMutability": "view", + "type": "function", + "name": "calc_withdraw_one_coin", + "inputs": [ + { + "name": "_token_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "8658" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_one_coin", + "inputs": [ + { + "name": "_token_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + }, + { + "name": "_min_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "4009643" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "ramp_A", + "inputs": [ + { + "name": "_future_A", + "type": "uint256" + }, + { + "name": "_future_time", + "type": "uint256" + } + ], + "outputs": [], + "gas": "159429" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "stop_ramp_A", + "inputs": [], + "outputs": [], + "gas": "154890" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_new_fee", + "inputs": [ + { + "name": "_new_fee", + "type": "uint256" + }, + { + "name": "_new_admin_fee", + "type": "uint256" + } + ], + "outputs": [], + "gas": "112848" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "apply_new_fee", + "inputs": [], + "outputs": [], + "gas": "103529" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "revert_new_parameters", + "inputs": [], + "outputs": [], + "gas": "22982" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "commit_transfer_ownership", + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "outputs": [], + "gas": "77020" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "apply_transfer_ownership", + "inputs": [], + "outputs": [], + "gas": "65697" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "revert_transfer_ownership", + "inputs": [], + "outputs": [], + "gas": "23072" + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_balances", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "7928" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "withdraw_admin_fees", + "inputs": [], + "outputs": [], + "gas": "22177" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "kill_me", + "inputs": [], + "outputs": [], + "gas": "40355" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "unkill_me", + "inputs": [], + "outputs": [], + "gas": "23192" + }, + { + "stateMutability": "view", + "type": "function", + "name": "coins", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3277" + }, + { + "stateMutability": "view", + "type": "function", + "name": "balances", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3307" + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3228" + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3258" + }, + { + "stateMutability": "view", + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3288" + }, + { + "stateMutability": "view", + "type": "function", + "name": "lp_token", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3318" + }, + { + "stateMutability": "view", + "type": "function", + "name": "redemption_price_snap", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3348" + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_pool", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3378" + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_virtual_price", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3408" + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_cache_updated", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3438" + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_coins", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3577" + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3498" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3528" + }, + { + "stateMutability": "view", + "type": "function", + "name": "initial_A_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3558" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_A_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3588" + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_actions_deadline", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3618" + }, + { + "stateMutability": "view", + "type": "function", + "name": "transfer_ownership_deadline", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3648" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3678" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_admin_fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "gas": "3708" + }, + { + "stateMutability": "view", + "type": "function", + "name": "future_owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "gas": "3738" + } +] \ No newline at end of file diff --git a/src/constants/coins-ethereum.ts b/src/constants/coins-ethereum.ts index 9026036d..a73902e2 100644 --- a/src/constants/coins-ethereum.ts +++ b/src/constants/coins-ethereum.ts @@ -92,6 +92,8 @@ export const USD_COINS_ETHEREUM: { [index: string]: string } = { busd: "0x4Fabb145d64652a948d72533023f6E7A623C7C53", // BUSD alusd: "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9", // alUSD mim: "0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3", // MIM + rai: "0x03ab458634910aad20ef5f1c8ee96f1d6ac54919", // RAI + wormholeust: "0xa693B19d2931d498c5B318dF961919BB4aee87a5", // UST '3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", // 3CRV crv: "0xD533a949740bb3306d119CC777fa900bA034cd52", // CRV @@ -194,6 +196,8 @@ export const DECIMALS_ETHEREUM: { [index: string]: number } = { "0x68749665ff8d2d112fa859aa293f07a622782f38": 6, // XAUt "0x090185f2135308bad17527004364ebcc2d37e5f6": 18, // SPELL "0xCdF7028ceAB81fA0C6971208e83fa7872994beE5": 18, // T + "0xa693B19d2931d498c5B318dF961919BB4aee87a5": 6, // Wormhole UST + "0x03ab458634910aad20ef5f1c8ee96f1d6ac54919": 18, // RAI // --- REWARD TOKENS --- diff --git a/src/pools.ts b/src/pools.ts index a072dd42..677988ec 100644 --- a/src/pools.ts +++ b/src/pools.ts @@ -2087,7 +2087,7 @@ export class Pool { private _calcLpTokenAmount = async (_amounts: ethers.BigNumber[], isDeposit = true): Promise => { const contract = curve.contracts[this.swap].contract; - if (["eurtusd", "xautusd", "crveth", "cvxeth", "spelleth", "teth"].includes(this.id) || this.isCryptoFactory) { + if (["eurtusd", "eursusd", "xautusd", "crveth", "cvxeth", "spelleth", "teth"].includes(this.id) || this.isCryptoFactory) { return await contract.calc_token_amount(_amounts, curve.constantOptions); } @@ -2101,7 +2101,7 @@ export class Pool { return await contract.calc_token_amount(this.swap, _amounts, isDeposit, curve.constantOptions); } - if (["eurtusd", "xautusd"].includes(this.id)) { + if (["eurtusd", "eursusd", "xautusd"].includes(this.id)) { return await contract.calc_token_amount(_amounts, curve.constantOptions); }