diff --git a/constants/abis/factory-stableswap-ng/pool.json b/constants/abis/factory-stableswap-ng/pool.json new file mode 100644 index 00000000..3d0ecc3b --- /dev/null +++ b/constants/abis/factory-stableswap-ng/pool.json @@ -0,0 +1,1435 @@ +[ + { + "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": "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[]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[]", + "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[]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[]", + "indexed": false + }, + { + "name": "token_supply", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "RemoveLiquidityOne", + "inputs": [ + { + "name": "provider", + "type": "address", + "indexed": true + }, + { + "name": "token_id", + "type": "int128", + "indexed": false + }, + { + "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[]", + "indexed": false + }, + { + "name": "fees", + "type": "uint256[]", + "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": "ApplyNewFee", + "inputs": [ + { + "name": "fee", + "type": "uint256", + "indexed": false + }, + { + "name": "offpeg_fee_multiplier", + "type": "uint256", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_A", + "type": "uint256" + }, + { + "name": "_fee", + "type": "uint256" + }, + { + "name": "_offpeg_fee_multiplier", + "type": "uint256" + }, + { + "name": "_ma_exp_time", + "type": "uint256" + }, + { + "name": "_coins", + "type": "address[]" + }, + { + "name": "_rate_multipliers", + "type": "uint256[]" + }, + { + "name": "_asset_types", + "type": "uint8[]" + }, + { + "name": "_method_ids", + "type": "bytes4[]" + }, + { + "name": "_oracles", + "type": "address[]" + } + ], + "outputs": [] + }, + { + "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": "exchange", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + }, + { + "name": "_min_dy", + "type": "uint256" + }, + { + "name": "_receiver", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "exchange_received", + "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": "exchange_received", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "_dx", + "type": "uint256" + }, + { + "name": "_min_dy", + "type": "uint256" + }, + { + "name": "_receiver", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[]" + }, + { + "name": "_min_mint_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_liquidity", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[]" + }, + { + "name": "_min_mint_amount", + "type": "uint256" + }, + { + "name": "_receiver", + "type": "address" + } + ], + "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": "remove_liquidity_one_coin", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + }, + { + "name": "_min_received", + "type": "uint256" + }, + { + "name": "_receiver", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_imbalance", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[]" + }, + { + "name": "_max_burn_amount", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity_imbalance", + "inputs": [ + { + "name": "_amounts", + "type": "uint256[]" + }, + { + "name": "_max_burn_amount", + "type": "uint256" + }, + { + "name": "_receiver", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "_min_amounts", + "type": "uint256[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "_min_amounts", + "type": "uint256[]" + }, + { + "name": "_receiver", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "remove_liquidity", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "_min_amounts", + "type": "uint256[]" + }, + { + "name": "_receiver", + "type": "address" + }, + { + "name": "_claim_admin_fees", + "type": "bool" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "withdraw_admin_fees", + "inputs": [], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "last_price", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "ema_price", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_p", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "price_oracle", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "D_oracle", + "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": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_dx", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + }, + { + "name": "dy", + "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": "view", + "type": "function", + "name": "calc_withdraw_one_coin", + "inputs": [ + { + "name": "_burn_amount", + "type": "uint256" + }, + { + "name": "i", + "type": "int128" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "totalSupply", + "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[]" + }, + { + "name": "_is_deposit", + "type": "bool" + } + ], + "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": "balances", + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_balances", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "stored_rates", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "dynamic_fee", + "inputs": [ + { + "name": "i", + "type": "int128" + }, + { + "name": "j", + "type": "int128" + } + ], + "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": "set_new_fee", + "inputs": [ + { + "name": "_new_fee", + "type": "uint256" + }, + { + "name": "_new_offpeg_fee_multiplier", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_ma_exp_time", + "inputs": [ + { + "name": "_ma_exp_time", + "type": "uint256" + }, + { + "name": "_D_ma_time", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "N_COINS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "coins", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "offpeg_fee_multiplier", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "admin_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": "admin_balances", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "ma_exp_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "D_ma_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "ma_last_time", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "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": "uint8" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "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": "nonces", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "salt", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ] + } +] diff --git a/constants/abis/factory-stableswap-ng/registry.json b/constants/abis/factory-stableswap-ng/registry.json new file mode 100644 index 00000000..2d0df5fb --- /dev/null +++ b/constants/abis/factory-stableswap-ng/registry.json @@ -0,0 +1,996 @@ +[ + { + "name": "BasePoolAdded", + "inputs": [ + { + "name": "base_pool", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "PlainPoolDeployed", + "inputs": [ + { + "name": "coins", + "type": "address[]", + "indexed": false + }, + { + "name": "A", + "type": "uint256", + "indexed": false + }, + { + "name": "fee", + "type": "uint256", + "indexed": false + }, + { + "name": "deployer", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "MetaPoolDeployed", + "inputs": [ + { + "name": "coin", + "type": "address", + "indexed": false + }, + { + "name": "base_pool", + "type": "address", + "indexed": false + }, + { + "name": "A", + "type": "uint256", + "indexed": false + }, + { + "name": "fee", + "type": "uint256", + "indexed": false + }, + { + "name": "deployer", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "name": "LiquidityGaugeDeployed", + "inputs": [ + { + "name": "pool", + "type": "address", + "indexed": false + }, + { + "name": "gauge", + "type": "address", + "indexed": false + } + ], + "anonymous": false, + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_fee_receiver", + "type": "address" + }, + { + "name": "_owner", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "name": "find_pool_for_coins", + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "find_pool_for_coins", + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "i", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_base_pool", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_n_coins", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_meta_n_coins", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_coins", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_underlying_coins", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_decimals", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_underlying_decimals", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_metapool_rates", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_balances", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_underlying_balances", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_A", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_fees", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_admin_balances", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_coin_indices", + "inputs": [ + { + "name": "_pool", + "type": "address" + }, + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "int128" + }, + { + "name": "", + "type": "int128" + }, + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_gauge", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_implementation_address", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "is_meta", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "get_pool_asset_types", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint8[]" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "deploy_plain_pool", + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_coins", + "type": "address[]" + }, + { + "name": "_A", + "type": "uint256" + }, + { + "name": "_fee", + "type": "uint256" + }, + { + "name": "_offpeg_fee_multiplier", + "type": "uint256" + }, + { + "name": "_ma_exp_time", + "type": "uint256" + }, + { + "name": "_implementation_idx", + "type": "uint256" + }, + { + "name": "_asset_types", + "type": "uint8[]" + }, + { + "name": "_method_ids", + "type": "bytes4[]" + }, + { + "name": "_oracles", + "type": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "deploy_metapool", + "inputs": [ + { + "name": "_base_pool", + "type": "address" + }, + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_coin", + "type": "address" + }, + { + "name": "_A", + "type": "uint256" + }, + { + "name": "_fee", + "type": "uint256" + }, + { + "name": "_offpeg_fee_multiplier", + "type": "uint256" + }, + { + "name": "_ma_exp_time", + "type": "uint256" + }, + { + "name": "_implementation_idx", + "type": "uint256" + }, + { + "name": "_asset_type", + "type": "uint8" + }, + { + "name": "_method_id", + "type": "bytes4" + }, + { + "name": "_oracle", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "deploy_gauge", + "inputs": [ + { + "name": "_pool", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_base_pool", + "inputs": [ + { + "name": "_base_pool", + "type": "address" + }, + { + "name": "_base_lp_token", + "type": "address" + }, + { + "name": "_asset_types", + "type": "uint8[]" + }, + { + "name": "_n_coins", + "type": "uint256" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_pool_implementations", + "inputs": [ + { + "name": "_implementation_index", + "type": "uint256" + }, + { + "name": "_implementation", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_metapool_implementations", + "inputs": [ + { + "name": "_implementation_index", + "type": "uint256" + }, + { + "name": "_implementation", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_math_implementation", + "inputs": [ + { + "name": "_math_implementation", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_gauge_implementation", + "inputs": [ + { + "name": "_gauge_implementation", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "set_views_implementation", + "inputs": [ + { + "name": "_views_implementation", + "type": "address" + } + ], + "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": "nonpayable", + "type": "function", + "name": "set_fee_receiver", + "inputs": [ + { + "name": "_pool", + "type": "address" + }, + { + "name": "_fee_receiver", + "type": "address" + } + ], + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "name": "add_asset_type", + "inputs": [ + { + "name": "_id", + "type": "uint8" + }, + { + "name": "_name", + "type": "string" + } + ], + "outputs": [] + }, + { + "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": "asset_types", + "inputs": [ + { + "name": "arg0", + "type": "uint8" + } + ], + "outputs": [ + { + "name": "", + "type": "string" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "pool_list", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "pool_count", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_pool_list", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_pool_count", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_pool_data", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "components": [ + { + "name": "lp_token", + "type": "address" + }, + { + "name": "coins", + "type": "address[]" + }, + { + "name": "decimals", + "type": "uint256" + }, + { + "name": "n_coins", + "type": "uint256" + }, + { + "name": "asset_types", + "type": "uint8[]" + } + ] + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "base_pool_assets", + "inputs": [ + { + "name": "arg0", + "type": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "pool_implementations", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "metapool_implementations", + "inputs": [ + { + "name": "arg0", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "math_implementation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "gauge_implementation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "views_implementation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "name": "fee_receiver", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address" + } + ] + } +] diff --git a/constants/configs/configs.js b/constants/configs/configs.js index 5c06490f..e930419b 100644 --- a/constants/configs/configs.js +++ b/constants/configs/configs.js @@ -57,6 +57,7 @@ const configs = { getFactoryCryptoRegistryAddress: async () => '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99', getFactoryCrvusdRegistryAddress: async () => '0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d', getFactoryTricryptoRegistryAddress: async () => '0x0c0e5f2ff0ff18a3be9b835635039256dc4b4963', + getFactoryStableswapNgRegistryAddress: async () => '0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf', graphEndpoint: `https://api.thegraph.com/subgraphs/name/convex-community/volume-mainnet`, DISABLED_POOLS_ADDRESSES: [].map(lc), BROKEN_POOLS_ADDRESSES: [ @@ -83,6 +84,7 @@ const configs = { getFactoryRegistryAddress: async () => '0x722272d36ef0da72ff51c5a65db7b870e2e8d4ee', getCryptoRegistryAddress: async () => '0x47bB542B9dE58b970bA50c9dae444DDB4c16751a', getFactoryCryptoRegistryAddress: async () => '0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69', + getFactoryStableswapNgRegistryAddress: async () => '0x1764ee18e8B3ccA4787249Ceb249356192594585', factoryImplementationAddressMap: new Map([ ['0x571FF5b7b346F706aa48d696a9a4a288e9Bb4091'.toLowerCase(), 'plain2basic'], ['0x8925D9d9B4569D737a48499DeF3f67BaA5a144b9'.toLowerCase(), 'plain2balances'], @@ -184,6 +186,7 @@ const configs = { getFactoryRegistryAddress: async () => '0xb17b674D9c5CB2e441F8e196a2f048A81355d031', getFactoryTricryptoRegistryAddress: async () => '0xbC0797015fcFc47d9C1856639CaE50D0e69FbEE8', getCryptoRegistryAddress: async () => '0x0E9fBb167DF83EdE3240D6a5fa5d40c6C6851e15', + getFactoryStableswapNgRegistryAddress: async () => '0x9AF14D26075f142eb3F292D5065EB3faa646167b', factoryImplementationAddressMap: new Map([ ['0x54e8A25d0Ac0E4945b697C80b8372445FEA17A62'.toLowerCase(), 'plain2basic'], ['0xD68970e266cE1A015953897C7055a5E0bC657Af8'.toLowerCase(), 'plain2balances'], @@ -272,6 +275,7 @@ const configs = { multicall2Address: '0x2DC0E2aa608532Da689e89e237dF582B783E552C', getFactoryRegistryAddress: async () => '0x2db0E83599a91b508Ac268a6197b8B14F5e72840', getCryptoRegistryAddress: async () => '0x7DA64233Fefb352f8F501B357c018158ED8aA455', + getFactoryStableswapNgRegistryAddress: async () => '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E', factoryImplementationAddressMap: new Map([ ['0xC2b1DF84112619D190193E48148000e3990Bf627'.toLowerCase(), 'plain2basic'], ['0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90'.toLowerCase(), 'plain2balances'], @@ -313,6 +317,7 @@ const configs = { approxBlocksPerDay: 16900, getFactoryRegistryAddress: async () => '0xD19Baeadc667Cf2015e395f2B08668Ef120f41F5', getCryptoRegistryAddress: async () => '0x8A4694401bE8F8FCCbC542a3219aF1591f87CE17', + getFactoryStableswapNgRegistryAddress: async () => '0xbC0797015fcFc47d9C1856639CaE50D0e69FbEE8', factoryImplementationAddressMap: new Map([ ['0x04e39EF8332e979Cf8e4f8891E64934FF65F231b'.toLowerCase(), 'plain2basic'], ['0xC9438d8928486bD9621D326002F4672bF684187A'.toLowerCase(), 'plain2balances'], @@ -544,6 +549,7 @@ const configs = { getFactoryRegistryAddress: async () => '0x3093f9B57A428F3EB6285a589cb35bEA6e78c336', getFactoryCryptoRegistryAddress: async () => '0x5EF72230578b3e399E6C6F4F6360edF95e83BBfd', getFactoryTricryptoRegistryAddress: async () => '0xA5961898870943c68037F6848d2D866Ed2016bcB', + getFactoryStableswapNgRegistryAddress: async () => '0xd2002373543Ce3527023C75e7518C274A51ce712', factoryImplementationAddressMap: new Map([ ['0xD166EEdf272B860E991d331B71041799379185D5'.toLowerCase(), 'plain2basic'], ['0x5C627d6925e448Ae418BC8a45d56B31fe5009Bea'.toLowerCase(), 'plain2balances'], diff --git a/pages/api/getMainRegistryPools.js b/pages/api/getMainRegistryPools.js index a99fda39..f2c12ee4 100644 --- a/pages/api/getMainRegistryPools.js +++ b/pages/api/getMainRegistryPools.js @@ -30,9 +30,7 @@ export default fn(async ({ blockchainId } = {}) => { let aggcalls = await multicall.methods.aggregate(calls).call(); const poolList = aggcalls[1].map((hex) => web3.eth.abi.decodeParameter('address', hex)); - return { poolList }; - }, { maxAge: 3600, // 1 hour name: 'getMainRegistryPools', diff --git a/pages/api/getPools/index.js b/pages/api/getPools/index.js index 06c92e7f..52af92c3 100644 --- a/pages/api/getPools/index.js +++ b/pages/api/getPools/index.js @@ -18,10 +18,12 @@ import factoryPoolAbi from 'constants/abis/factory-v2/Plain2Balances.json'; import factoryCryptoRegistryAbi from 'constants/abis/factory-crypto-registry.json'; import factoryCrvusdRegistryAbi from 'constants/abis/factory-crvusd/registry.json'; import factoryTricryptoRegistryAbi from 'constants/abis/factory-tricrypto/registry.json'; +import factoryStableswapNgRegistryAbi from 'constants/abis/factory-stableswap-ng/registry.json'; import factoryEywaRegistryAbi from 'constants/abis/fantom/factory-eywa/registry.json'; import cryptoRegistryAbi from 'constants/abis/crypto-registry.json'; import factoryCryptoPoolAbi from 'constants/abis/factory-crypto/factory-crypto-pool-2.json'; import factoryTricryptoPoolAbi from 'constants/abis/factory-crypto/factory-crypto-pool-2.json'; +import factoryStableNgPoolAbi from 'constants/abis/factory-stableswap-ng/pool.json'; import factoryCrvusdPoolAbi from 'constants/abis/factory-crvusd/pool.json'; import factoryEywaPoolAbi from 'constants/abis/fantom/factory-eywa/pool.json'; import erc20Abi from 'constants/abis/erc20.json'; @@ -153,7 +155,7 @@ const getEthereumOnlyData = async ({ preventQueryingFactoData, blockchainId }) = } } - const { poolList: mainRegistryPoolList } = await getMainRegistryPools.straightCall(); + const { poolList: mainRegistryPoolList } = await getMainRegistryPools.straightCall({ blockchainId }); const mainRegistryPoolGaugesRewards = ( blockchainId === 'ethereum' ? (await getMainPoolsGaugeRewards.straightCall(gaugesData)).mainPoolsGaugeRewards : @@ -199,7 +201,7 @@ const isDefinedCoin = (address) => address !== '0x000000000000000000000000000000 /** * Params: * - blockchainId: 'ethereum' (default) | any side chain - * - registryId: 'factory' | 'main' | 'crypto' | 'factory-crypto' | 'factory-crvusd' | 'factory-tricrypto' | 'factory-eywa' + * - registryId: 'factory' | 'main' | 'crypto' | 'factory-crypto' | 'factory-crvusd' | 'factory-tricrypto' | 'factory-eywa' | 'factory-stable-ng * * 'factory-crvusd', 'factory-tricrypto' and 'factory-eywa' are custom factories that aren't meant to be found on all chains */ @@ -241,6 +243,7 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) getFactoryCryptoRegistryAddress, getFactoryCrvusdRegistryAddress, getFactoryTricryptoRegistryAddress, + getFactoryStableswapNgRegistryAddress, getFactoryEywaRegistryAddress, multicall2Address, BASE_POOL_LP_TO_GAUGE_LP_MAP, @@ -248,8 +251,8 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) BROKEN_POOLS_ADDRESSES, } = config; - if (registryId !== 'factory' && registryId !== 'main' && registryId !== 'crypto' && registryId !== 'factory-crypto' && registryId !== 'factory-crvusd' && registryId !== 'factory-tricrypto' && registryId !== 'factory-eywa') { - throw new ParamError('registryId must be \'factory\'|\'main\'|\'crypto\'|\'factory-crypto\'|\'factory-crvusd\'|\'factory-tricrypto\'|\'factory-eywa\''); + if (registryId !== 'factory' && registryId !== 'main' && registryId !== 'crypto' && registryId !== 'factory-crypto' && registryId !== 'factory-crvusd' && registryId !== 'factory-tricrypto' && registryId !== 'factory-eywa' && registryId !== 'factory-stable-ng') { + throw new ParamError('registryId must be \'factory\'|\'main\'|\'crypto\'|\'factory-crypto\'|\'factory-crvusd\'|\'factory-tricrypto\'|\'factory-eywa\'|\'factory-stable-ng\''); } const platformRegistries = (await getPlatformRegistries(blockchainId)).registryIds; @@ -273,8 +276,9 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) registryId === 'factory-crypto' ? await getFactoryCryptoRegistryAddress() : registryId === 'factory-crvusd' ? await getFactoryCrvusdRegistryAddress() : registryId === 'factory-tricrypto' ? await getFactoryTricryptoRegistryAddress() : - registryId === 'factory-eywa' ? await getFactoryEywaRegistryAddress() : - undefined + registryId === 'factory-stable-ng' ? await getFactoryStableswapNgRegistryAddress() : + registryId === 'factory-eywa' ? await getFactoryEywaRegistryAddress() : + undefined ); if (registryAddress === ZERO_ADDRESS || !registryAddress) return { poolData: [], tvlAll: 0 }; @@ -285,16 +289,18 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) registryId === 'factory-crypto' ? `factory-crypto-${id}` : registryId === 'factory-crvusd' ? `factory-crvusd-${id}` : registryId === 'factory-tricrypto' ? `factory-tricrypto-${id}` : - registryId === 'factory-eywa' ? `factory-eywa-${id}` : - undefined + registryId === 'factory-stable-ng' ? `factory-stable-ng-${id}` : + registryId === 'factory-eywa' ? `factory-eywa-${id}` : + undefined ); const POOL_ABI = ( registryId === 'factory-crypto' ? factoryCryptoPoolAbi : registryId === 'factory-crvusd' ? factoryCrvusdPoolAbi : registryId === 'factory-tricrypto' ? factoryTricryptoPoolAbi : - registryId === 'factory-eywa' ? factoryEywaPoolAbi : - factoryPoolAbi + registryId === 'getFactoryStableswapNgRegistryAddress' ? factoryStableNgPoolAbi : + registryId === 'factory-eywa' ? factoryEywaPoolAbi : + factoryPoolAbi ); const REGISTRY_ABI = ( @@ -305,8 +311,9 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) ...REGISTRY_GET_IMPLEMENTATION_ADDRESS_ABI, // Hack, see get_implementation_address call for factory-tricrypto for context ] : registryId === 'factory-eywa' ? factoryEywaRegistryAbi : - registryId === 'crypto' ? cryptoRegistryAbi : - factoryV2RegistryAbi + registryId === 'factory-stable-ng' ? factoryStableswapNgRegistryAbi : + registryId === 'crypto' ? cryptoRegistryAbi : + factoryV2RegistryAbi ); @@ -369,6 +376,7 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) 'factory-crypto': ['main', 'crypto', 'factory-crvusd'], factory: ['main', 'crypto', 'factory-crypto', 'factory-crvusd'], 'factory-tricrypto': ['main', 'factory-crvusd', 'factory'], + 'factory-stable-ng': ['main', 'factory-crvusd', 'factory', 'factory-crypto'], }; otherRegistryPoolsData = await sequentialPromiseFlatMap(REGISTRIES_DEPENDENCIES[registryId], async (id) => ( // eslint-disable-next-line no-use-before-define @@ -468,20 +476,13 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) metaData: { poolId, type: 'oracleMethod' }, ...networkSettingsParam, }, - // 'main' and 'factory' registries have these pieces of info, others do not ...( - (registryId === 'main' || registryId === 'factory' || registryId === 'factory-crvusd' || registryId === 'factory-eywa') ? [{ + (registryId === 'main' || registryId === 'factory' || registryId === 'factory-crvusd' || registryId === 'factory-eywa' || registryId === 'factory-stable-ng') ? [{ contract: registry, methodName: 'get_underlying_decimals', // address[8] params: [address], metaData: { poolId, type: 'underlyingDecimals' }, ...networkSettingsParam, - }, { - contract: registry, - methodName: 'get_pool_asset_type', // uint256 - params: [address], - metaData: { poolId, type: 'assetType' }, - ...networkSettingsParam, }, { contract: poolContract, methodName: 'totalSupply', @@ -495,7 +496,16 @@ const getPools = async ({ blockchainId, registryId, preventQueryingFactoData }) }] : [] ), ...( - (registryId === 'factory' || registryId === 'factory-crvusd' || registryId === 'factory-eywa') ? [{ + (registryId === 'main' || registryId === 'factory' || registryId === 'factory-crvusd' || registryId === 'factory-eywa') ? [{ + contract: registry, + methodName: 'get_pool_asset_type', // uint256 + params: [address], + metaData: { poolId, type: 'assetType' }, + ...networkSettingsParam, + }] : [] + ), + ...( + (registryId === 'factory' || registryId === 'factory-crvusd' || registryId === 'factory-eywa' || registryId === 'factory-stable-ng') ? [{ contract: registry, methodName: 'get_implementation_address', // address params: [address], diff --git a/utils/data/curve-platform-registries.js b/utils/data/curve-platform-registries.js index 13fcacf4..5b3a82a5 100644 --- a/utils/data/curve-platform-registries.js +++ b/utils/data/curve-platform-registries.js @@ -30,6 +30,7 @@ const getPlatformRegistries = memoize(async (blockchainId) => { getFactoryCrvusdRegistryAddress, getFactoryTricryptoRegistryAddress, getFactoryEywaRegistryAddress, + getFactoryStableswapNgRegistryAddress, hasNoMainRegistry, } = config; @@ -42,6 +43,7 @@ const getPlatformRegistries = memoize(async (blockchainId) => { (typeof getFactoryCrvusdRegistryAddress === 'function' ? 'factory-crvusd' : null), (typeof getFactoryTricryptoRegistryAddress === 'function' ? 'factory-tricrypto' : null), (typeof getFactoryEywaRegistryAddress === 'function' ? 'factory-eywa' : null), + (typeof getFactoryStableswapNgRegistryAddress === 'function' ? 'factory-stable-ng' : null), ].filter((o) => o !== null), registryAddresses: [ (!hasNoMainRegistry ? (await getMainRegistryAddress(blockchainId)) : null), @@ -51,6 +53,7 @@ const getPlatformRegistries = memoize(async (blockchainId) => { (typeof getFactoryCrvusdRegistryAddress === 'function' ? (await getFactoryCrvusdRegistryAddress()) : null), (typeof getFactoryTricryptoRegistryAddress === 'function' ? (await getFactoryTricryptoRegistryAddress()) : null), (typeof getFactoryEywaRegistryAddress === 'function' ? (await getFactoryEywaRegistryAddress()) : null), + (typeof getFactoryStableswapNgRegistryAddress === 'function' ? (await getFactoryStableswapNgRegistryAddress()) : null), ].filter((o) => o !== null), }; }, {